Jump to content

Recommended Posts

Posted

I'm new to AutoTI, coming from a VB Script background. In VBS there is a function to move every object in a folder, and it will loop until all objects, ie files, hae been moved, without explicitly knowing any file names. I cannot find a similar functionin AutoIT. Do I have to load all the file names into an array, then loop through the array to get the file name then move the named file?

Mike

Posted (edited)

$SourceFolder = "YourSourceFolder"
$DestinationFolder = "YourDestinationFolder"

Do
    FileMove($SourceFolder & "\*.*", $DestinationFolder & "\")
    Sleep(10)
Until FileFindFirstFile($SourceFolder & "\*.*") = -1

Edited Until line because my solution did not work at first

Edited by Varian
Posted (edited)
Your post is empty Edited by iEvKI3gv9Wrkd41u

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...