Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Script Issue

$
0
0
Hello all,
I'm having a little trouble with the following script,

[ autoit ]         
HotKeySet("!+d", "exit1") While 1 If Not FileExists(@UserProfileDir & "\Copy Folder\") Then DirCreate(@UserProfileDir & "\Copy Folder\") EndIf If Not FileExists(@DesktopDir & "\folder\") Then DirCreate(@DesktopDir & "\folder\") EndIf Local $search = FileFindFirstFile(@UserProfileDir & "\Copy Folder\*.*") Local $file = FileFindNextFile($search) If @error = 1 Then ContinueLoop Else Sleep(1000) EndIf FileCopy(@UserProfileDir & "\Copy Folder\" & $file, @DesktopDir & "\folder\" & $file) Sleep(1000) If FileExists(@DesktopDir & "\folder\" & $file) Then FileDelete(@UserProfileDir & "\Copy Folder\" & $file) EndIf Sleep(1000) FileClose($search) WEnd Func exit1() Exit EndFunc ;==>exit1

for some reason, it isnt creating the directory on the desktop when it doesn't exist.
any help would be amazing

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>