As general, i had wrote one simple script to copy file from one location to another destination location. However the script is just a very script without any useful information for non-IT user.
So try to workout on the errorlevel which once succesful copy file, it will appears the message info at command prompt.
my trial command as below, but it does not shows the expected result.
echo .. Summary ..
-- Expected have file to copy -- expected to copy file
copy c:\a\trial.txt c:\b\
if errorlevel 0 set true_=YES
if errorlevel 1 set true_=NO
if %true_%== YES goto level1
if %true_%== NO goto level2
echo A. Copied file trial.txt
echo A. Failed to copy file trial.txt
-- expected no file to copy - expected to be failed.
copy c:\trial2nd.txt c:\ab\
if errorlevel 0 set true1_=YES
if errorlevel 1 set true1_=NO
if %true1_%== YES goto level11
if %true1_%== NO goto level12
echo B. Copied file trial2nd.txt
echo B. Failed to copy file trial2nd.txt
echo .. end of summary
Did my script have problem!
Thanks for point out my problem!