Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 9162

Command/script to copy files with certain ext, which may have the same name, from folder structure to singe directory and rename

$
0
0

From a source directory structure (multiple folders), I need to copy all csv files to a single target directory. I found a command to do this, though files of the same name exist within different folders of the source structure, causing obvious issues when copied to one folder.

How can the files with duplicate names be renamed during the copy please (ideally: report.csv, reportcopy2.csv etc)? The job currently only copies a single instance of each file. Thanks for help.


Viewing all articles
Browse latest Browse all 9162

Trending Articles