Vassago
Former Staff Turned AWF Retiree
- Local time
- Today, 03:49
- Joined
- Dec 26, 2002
- Messages
- 4,748
Hello,
I have a file structure like this:
C:\Test\01.2020\ABC\FileA.csv
C:\Test\01.2020\ABC\FileB.csv
C:\Test\01.2020\ABC\FileC.csv
C:\Test\01.2020\BBC\FileA.csv
C:\Test\01.2020\BBC\FileC.csv
C:\Test\02.2020\DBC\FileA.csv
C:\Test\02.2020\DBC\FileB.csv
I need to create a script that will loop through the folders in C:\Test and capture all csv files, copying and renaming them to the following:
C:\Dest\012020_ABC_FileA.csv
C:\Dest\012020_ABC_FileB.csv
C:\Dest\012020_ABC_FileC.csv
C:\Dest\012020_BBC_FileA.csv
C:\Dest\012020_BBC_FileC.csv
C:\Dest\022020_DBC_FileA.csv
C:\Dest\022020_DBC_FileB.csv
I'm not great in batch scripts. Anyone have a good solution for this?
Thanks!
I have a file structure like this:
C:\Test\01.2020\ABC\FileA.csv
C:\Test\01.2020\ABC\FileB.csv
C:\Test\01.2020\ABC\FileC.csv
C:\Test\01.2020\BBC\FileA.csv
C:\Test\01.2020\BBC\FileC.csv
C:\Test\02.2020\DBC\FileA.csv
C:\Test\02.2020\DBC\FileB.csv
I need to create a script that will loop through the folders in C:\Test and capture all csv files, copying and renaming them to the following:
C:\Dest\012020_ABC_FileA.csv
C:\Dest\012020_ABC_FileB.csv
C:\Dest\012020_ABC_FileC.csv
C:\Dest\012020_BBC_FileA.csv
C:\Dest\012020_BBC_FileC.csv
C:\Dest\022020_DBC_FileA.csv
C:\Dest\022020_DBC_FileB.csv
I'm not great in batch scripts. Anyone have a good solution for this?
Thanks!