Sign in to follow this  
Followers 0
OldMike

How to do block move of all files in a folder?

3 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  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

Share this post


Link to post
Share on other sites

#3 ·  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 ...
 

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0