Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 445
  • Last Modified:

Move files from multiple subdirectories to a single directory

Greetings,

I have several hundred folders, named with a naming convention.  I would like to move all the files in those folders into a single folder.

Given:
1)  All folders are named "EM-LIST-########.csv
2)  Target folder is named VSCs

I tried:  "move EM-LIST-*.csv\*      VSCs"

It seems like this should work.  If I do only one directory's files (i.e. substitute actual string value for the first *  ), it works.

Any ideas?

Thanks in advance.

I tried:  move
0
jspurr01
Asked:
jspurr01
1 Solution
 
burrcmCommented:
Do a search for all the files first - EM-LIST-*.csv, then move from there to the new folder.

Chris B
0
 
ramsys_alCommented:
Try using a batch file.

Make a batch file using MS-DOS commands.

Use notepad to make the file, but save it as .bat file, not as .txt

For example:
cls
cd EM-LIST-######01.csv
move *.* VSCs
cd EM-LIST-######02.csv

Al R.
0
 
jspurr01Author Commented:
Awesome!  I love the simple solution!  Thanks.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now