For Example , we have folder named "ParentFolder" and inside this folder we have "Child1" "Child2" folders and inside this i have a text file.
Target folder is named as "Targetfolder"
I want to 1st check if the subfolder of "Parentfolder" has "Child1" folder in it and then copy this folder "Child1" and its contents to "Targetfolder"
this is what i have done so far but i am getting both child1 and child2 folder .
Expand|Select|Wrap|Line Numbers
- @echo on
- set FOLDER1=c:\Temp\FOLDER1
- set FOLDER2=c:\Temp\FOLDER2
- if exist %FOLDER1% ( xcopy /Q /D /S /V %FOLDER1% %FOLDER2% )
- :END