Script to Create Folder, Sub-folders and copy to destination
Posted: 10 Nov 2013 07:15
Hello,
This is very difficult and tiring to do manually which i am facing daily, i request the experts to help me in sorting this issue.
I have 50 folders at one workstation, starting from 000 to 050. The work station path:
D:\Depository\BBC\[(Todays date-format ddmmyyyy)]\data\000
D:\Depository\BBC\[(Todays date-format ddmmyyyy)]\data\001
D:\Depository\BBC\[(Todays date-format ddmmyyyy)]\data\002
.......\050
File types in the folder are .pdf, .txt, .tiff & .jpeg in each folder.
I need to create a backup from workstation to Network in which i required to first create folder and sub folders and then copy files.
Stage 1.
Network Path: \\acer\c:\Repository\000\
Create folder on todays date (dd-mm-yyyy) and create 3 sub folders named: PDF,TEXT,IMAGES
It will be something like this:
\\acer\c:\Repository\000\10-11-2013\data\PDF
\\acer\c:\Repository\000\10-11-2013\data\TEXT
\\acer\c:\Repository\000\10-11-2013\data\IMAGES
\\acer\c:\Repository\001\10-11-2013\data\PDF
\\acer\c:\Repository\001\10-11-2013\data\TEXT
\\acer\c:\Repository\001\10-11-2013\data\IMAGES
Stage 2.
Copy the files from folder 000 of workstation to
\\acer\c:\Repository\000\10-11-2013\data\PDF (Copy all .pdf from folder \000\*.pdf)
\\acer\c:\Repository\000\10-11-2013\data\TEXT (Copy all .txt from folder \000\*.txt)
\\acer\c:\Repository\000\10-11-2013\data\IMAGES (which will be all .tiff & .jpeg from folder \000\*.tiff & *.jpeg)
\\acer\c:\Repository\001\10-11-2013\data\PDF (Copy all .pdf from folder \001\*.pdf)
\\acer\c:\Repository\001\10-11-2013\data\TEXT (Copy all .txt from folder \001\*.txt)
\\acer\c:\Repository\001\10-11-2013\data\IMAGES (which will be all .tiff & .jpeg from folder \001\*.tiff & *.jpeg)
Do this for all folders starting from 000 to 050.
Experts please help.
This is very difficult and tiring to do manually which i am facing daily, i request the experts to help me in sorting this issue.
I have 50 folders at one workstation, starting from 000 to 050. The work station path:
D:\Depository\BBC\[(Todays date-format ddmmyyyy)]\data\000
D:\Depository\BBC\[(Todays date-format ddmmyyyy)]\data\001
D:\Depository\BBC\[(Todays date-format ddmmyyyy)]\data\002
.......\050
File types in the folder are .pdf, .txt, .tiff & .jpeg in each folder.
I need to create a backup from workstation to Network in which i required to first create folder and sub folders and then copy files.
Stage 1.
Network Path: \\acer\c:\Repository\000\
Create folder on todays date (dd-mm-yyyy) and create 3 sub folders named: PDF,TEXT,IMAGES
It will be something like this:
\\acer\c:\Repository\000\10-11-2013\data\PDF
\\acer\c:\Repository\000\10-11-2013\data\TEXT
\\acer\c:\Repository\000\10-11-2013\data\IMAGES
\\acer\c:\Repository\001\10-11-2013\data\PDF
\\acer\c:\Repository\001\10-11-2013\data\TEXT
\\acer\c:\Repository\001\10-11-2013\data\IMAGES
Stage 2.
Copy the files from folder 000 of workstation to
\\acer\c:\Repository\000\10-11-2013\data\PDF (Copy all .pdf from folder \000\*.pdf)
\\acer\c:\Repository\000\10-11-2013\data\TEXT (Copy all .txt from folder \000\*.txt)
\\acer\c:\Repository\000\10-11-2013\data\IMAGES (which will be all .tiff & .jpeg from folder \000\*.tiff & *.jpeg)
\\acer\c:\Repository\001\10-11-2013\data\PDF (Copy all .pdf from folder \001\*.pdf)
\\acer\c:\Repository\001\10-11-2013\data\TEXT (Copy all .txt from folder \001\*.txt)
\\acer\c:\Repository\001\10-11-2013\data\IMAGES (which will be all .tiff & .jpeg from folder \001\*.tiff & *.jpeg)
Do this for all folders starting from 000 to 050.
Experts please help.