michaelslamet Posted March 4, 2011 Share Posted March 4, 2011 (edited) Hi, I want to search a folder that has a name "ABC" in that folder. This mean including folder named ABC1, 1ABC, ABC2, 2ABC, 11ABC22, etc. If yes then copy those folder to desktop. If the folder doesn't exist then find a file with name "ABC" in the file name and copy them to desktop. Any idea how to do this? I know about DirCopy but cant find a way to search and match the folder name. Thanks a lot Edited March 5, 2011 by michaelslamet Link to comment Share on other sites More sharing options...
jvanegmond Posted March 4, 2011 Share Posted March 4, 2011 (edited) In command prompt: move *ABC* %userprofile%\desktop\ Or AutoIt: Run("move *ABC* %userprofile%\desktop\") Depends on working directory of course. You can also do something like: move C:\MyFolderThatHasLotsOfAbcFilesRandomly\*ABC* %userprofile%\desktop\ Edited March 4, 2011 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
JohnOne Posted March 4, 2011 Share Posted March 4, 2011 _FileListToArray() will find files or filders and return them to an array. You just have to parse the file/foldernames and create your logic from there. 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 March 4, 2011 Share Posted March 4, 2011 Hi michaelslamet,perhaps you also want to take a look at the RecFileListToArray() Function by Melba23: Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
michaelslamet Posted March 5, 2011 Author Share Posted March 5, 2011 _FileListToArray() will find files or filders and return them to an array.You just have to parse the file/foldernames and create your logic from there.This is what I need!Thanks JohnOne, Manadar and Hannes123 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