Sunday 9 June 2013

Copy All files to a Specific Folder Batch Program

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...

Thank You for visiting...if you like the post click on +1 or like...
Join as member for more tricks...

No comments:

Post a Comment