I need to copy folder and its contents to target folder Using Batch Scripting.
For Example , we have folder named "ParentFolder" and inside this folder we have "Child1" folder and inside this i have a text file.
Target folder is named as "Targetfolder"
I want to 1st check if the subfolder of "Parentfolder" is "Child1" folder and then copy the whole folder "Child1" to "Targetfolder"
EDIT - Added code from comment
@echo on
set FOLDER1=c:\Temp\FOLDER1
set FOLDER2=c:\Temp\FOLDER2
if exist %FOLDER1% ( xcopy /Q /D /S /V %FOLDER1% %FOLDER2% )
:END
@echo on set FOLDER1=c:\Temp\FOLDER1 set FOLDER2=c:\Temp\FOLDER2 if exist %FOLDER1% ( xcopy /Q /D /S /V %FOLDER1% %FOLDER2% ) :ENDI want only selected folders inside FOLDER1, FOLDER1 has several folders