move Files from different folders
Posted: 11 Apr 2008 11:23
Hello
i need to create a batch file to copy xml files from different folders in the same directory
for e.g.
The path:
D:\PRASHOB\LY-01\jurion\test3\New\output1\XML
contains around 750 folders each contains some xml files.
now each folder may contain xml files maximum of five different types.
i.e.
1) kg_2007-04-12_8-u-76-06_jurion.xml (*_jurion.xml)
2) kg_2007-04-12_8-u-76-06_vt.xml (*_vt.xml)
3) kg_2007-04-12_8-u-76-06_cas_ur.xml (*_cas*.xml)
4) kg_2007-04-12_8-u-76-06_pm.xml (*_pm.xml)
5) kg_2007-04-12_8-u-76-06_lsa.xml (*_ls*.xml)
now here i want to move each type of xml files from each folder to its respective folders:
FOLDER NAME
*_jurion.xml move to jurion
*_vt.xml - vt
*_pm.xml - pm
*_cas*.xml -cas
*_ls*.xml -ls
the batch file should go to the folder take out the xml file from that folder and move it to the respective folder mentioned above.
I also encounter problem if the file naming is too long
Please help me in this.
Regards
Prashob
i need to create a batch file to copy xml files from different folders in the same directory
for e.g.
The path:
D:\PRASHOB\LY-01\jurion\test3\New\output1\XML
contains around 750 folders each contains some xml files.
now each folder may contain xml files maximum of five different types.
i.e.
1) kg_2007-04-12_8-u-76-06_jurion.xml (*_jurion.xml)
2) kg_2007-04-12_8-u-76-06_vt.xml (*_vt.xml)
3) kg_2007-04-12_8-u-76-06_cas_ur.xml (*_cas*.xml)
4) kg_2007-04-12_8-u-76-06_pm.xml (*_pm.xml)
5) kg_2007-04-12_8-u-76-06_lsa.xml (*_ls*.xml)
now here i want to move each type of xml files from each folder to its respective folders:
FOLDER NAME
*_jurion.xml move to jurion
*_vt.xml - vt
*_pm.xml - pm
*_cas*.xml -cas
*_ls*.xml -ls
the batch file should go to the folder take out the xml file from that folder and move it to the respective folder mentioned above.
I also encounter problem if the file naming is too long
Please help me in this.
Regards
Prashob