Jump to content
Sign in to follow this  
michaelslamet

[SOLVED] how to find and copy entire folder

Recommended Posts

michaelslamet

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 by michaelslamet

Share this post


Link to post
Share on other sites
jvanegmond

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 by Manadar

Share this post


Link to post
Share on other sites
hannes08

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]

Share this post


Link to post
Share on other sites
michaelslamet

_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 :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.