I need to add certain files to TodayDate.rar for this I am using cmd batch file with following code which is working fine.
"C:\Program Files\WinRAR\rar" a -agmmddyy ".rar"
Now I am changing above code and using If Condition as in following code then it is not working. why?
if %time:~0,2% lss 13(
"C:\Program Files\WinRAR\rar" a -agmmddyy " Morning.rar"
) else (
"C:\Program Files\WinRAR\rar" a -agmmddyy "Afternoon.rar"
)
Actually I need to do this Two time, first in the morning and second in afternoon that's why I added if condition to evaluate time and write the Name of file with Morning and Afternoon accordingly.
Aucun commentaire:
Enregistrer un commentaire