Sam31 Posted January 24, 2012 Share 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 Link to comment Share on other sites More sharing options...
JohnOne Posted January 24, 2012 Share 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. Link to comment Share on other sites More sharing options...
Sam31 Posted January 24, 2012 Author Share Posted January 24, 2012 I find if stringleft function but my prob is the search function Link to comment Share on other sites More sharing options...
Sam31 Posted January 24, 2012 Author Share Posted January 24, 2012 Ok finally it's not necessary to do anything special: "Filemove" function that all I need. Link to comment Share on other sites More sharing options...
Mikeman27294 Posted January 24, 2012 Share 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. Link to comment Share on other sites More sharing options...
JohnOne Posted January 24, 2012 Share 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. Link to comment Share on other sites More sharing options...
hannes08 Posted January 24, 2012 Share 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] Link to comment Share on other sites More sharing options...
Mikeman27294 Posted January 25, 2012 Share 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. Link to comment Share on other sites More sharing options...
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