xcopy - how to copy and paste file into folder using batch -


i want create batch file copy content of folder , paste folder. say

     source: d:\backup\test destination: d:\backup1 

but here want create subfolder destination can paste file.

 @echo off    :: variables     echo backing file    set /p source=enter source folder:    set /p destination=enter destination folder:     set listfile=xcopy /l    set xcopy=xcopy /s/e/v/q/f/h     %listfile% %source% %destination%     echo files copy press enter proceed    pause     %xcopy% %source% %destination%    pause 

the if not exist checks see if directory exists. if not, mkdir creates it.

@echo off  echo backing file set /p source=enter source folder:  set /p destination=enter destination folder:   if not exist %destination% mkdir %destination% set listfile=xcopy /l set xcopy=xcopy /s/e/v/q/f/h  %listfile% %source% %target% echo files listed copied. pause  %xcopy% %source% %destination% 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -