Jump to content

Recommended Posts

Posted (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 by michaelslamet
Posted (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 by Manadar
Posted

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]
Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...