Sam31 Posted January 24, 2012 Posted January 24, 2012 I looking for a script which can do this: ---------------------------------------------- pathA = C:\folder01\ pathB = C:\folder02\ For all files in pathA If file_name start with "B" Then move to pathB ---------------------------------------------- Thanks
JohnOne Posted January 24, 2012 Posted January 24, 2012 Instead of looking for one, I suggest you write one. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Sam31 Posted January 24, 2012 Author Posted January 24, 2012 I find if stringleft function but my prob is the search function
Sam31 Posted January 24, 2012 Author Posted January 24, 2012 Ok finally it's not necessary to do anything special: "Filemove" function that all I need.
Mikeman27294 Posted January 24, 2012 Posted January 24, 2012 Ok, well I am not aware of a FileMove() function native to AutoIT, so this is what I do: Func _FileMove($Source, $Destination) FileWrite($Destination, FileRead($Source)) FileDelete($Source) Return EndFunc And if you want to copy the file rather than move it, it is a similar function, but without the delete. Func _FileCopy($Source, $Destination) FileWrite($Destination, FileRead($Source)) EndFunc Hope that helps.
JohnOne Posted January 24, 2012 Posted January 24, 2012 FileMove ( "source", "dest" [, flag] ) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
hannes08 Posted January 24, 2012 Posted January 24, 2012 Ok, well I am not aware of a FileMove() function native to AutoIT, so this is what I do: Func _FileMove($Source, $Destination) FileWrite($Destination, FileRead($Source)) FileDelete($Source) Return EndFunc Well, you're aware that this is very - veeery inefficient - right? Better use FileMove() because it doesn't write a complete file but instead just moves entries in the filesystem. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Mikeman27294 Posted January 25, 2012 Posted January 25, 2012 Oh, so there is actually a command for that? Didn't come up in my scite calltips. I better check that out.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now