1.Open Notepad and paste the code
@ECHO OFF
::variables
echo enter the source folder name
set/p "src=>"
echo enter the detination folder name
set/p "des=>"
set backupdir=%USERPROFILE%\Desktop\%des%
set backupcmd=%xcopy /s /c /d /e /h /i /r /y
if NOT EXIST %src% goto FAIL
%backupcmd% "%USERPROFILE%\Desktop\%src%" "%backupdir%"
echo copy succcessful...
pause
exit
:FAIL
echo source folder does not exsist
pause 1
goto end
:END
exit
Now save it as copy.bat
2.Double click on it.
3.If the source folder exsist then it will show the window
4.If the source folder does not exsist then it will show
Done...
No comments:
Post a Comment