Batch for flat move of files
Posted: 08 Oct 2014 06:46
Dear all,
I am looking for a batch solution for this: a third party software daily generates files in the following folder structure:
E:\Base\Folder 1\2014_10_06\File1.xml
E:\Base\Folder 1\2014_10_07\File2.xml
E:\Base\Folder 1\2014_10_08\File3.xml
E:\Base\Folder 2\2014_10_06\File4.xml
E:\Base\Folder 2\2014_10_07\File5.xml
E:\Base\Folder 2\2014_10_08\File6.xml
I would like to have a batch doing the following steps:
1. Move the files from all subfolders to a single folder
E:\Data\Collection\File1.xml
E:\Data\Collection\File2.xml
E:\Data\Collection\File3.xml
E:\Data\Collection\File4.xml
E:\Data\Collection\File5.xml
E:\Data\Collection\File6.xml
2. Delete all subfolders of E:\Stamm\Folder 1 and E:\Stamm\Folder 2
The server runs under Windows 2008 R2. It is ensured that all the affected files have unique file names as the third party software automatically numbers the files ascending.
Unfortunately, I'm stuck with my previous approaches.
I am looking for a batch solution for this: a third party software daily generates files in the following folder structure:
E:\Base\Folder 1\2014_10_06\File1.xml
E:\Base\Folder 1\2014_10_07\File2.xml
E:\Base\Folder 1\2014_10_08\File3.xml
E:\Base\Folder 2\2014_10_06\File4.xml
E:\Base\Folder 2\2014_10_07\File5.xml
E:\Base\Folder 2\2014_10_08\File6.xml
I would like to have a batch doing the following steps:
1. Move the files from all subfolders to a single folder
E:\Data\Collection\File1.xml
E:\Data\Collection\File2.xml
E:\Data\Collection\File3.xml
E:\Data\Collection\File4.xml
E:\Data\Collection\File5.xml
E:\Data\Collection\File6.xml
2. Delete all subfolders of E:\Stamm\Folder 1 and E:\Stamm\Folder 2
The server runs under Windows 2008 R2. It is ensured that all the affected files have unique file names as the third party software automatically numbers the files ascending.
Unfortunately, I'm stuck with my previous approaches.