Write a batch file to archive all files in a folder located in d:\workingfolder to d:\backupfolder using winrar command line
Here is an example of a batch file that could be used to archive all files in a folder using WinRAR
@echo off echo This batch file will create a WinRAR archive of all files in the "workingfolder" directory. echo. rem Set the source and destination folders set source=D:\workingfolder\* set destination=D:\backupfolder\archive.rar rem Create the archive "C:\Program Files\WinRAR\rar.exe" a -r %destination% %source% echo Done!
Note that this is just an example, and you may need to modify the paths to match your specific setup. Additionally, you must have WinRAR installed on your computer in order for this script to work.
@echo off echo This batch file will create a WinRAR archive of all files in the "workingfolder" directory. echo. rem Set the source and destination folders set source=D:\workingfolder\* set destination=D:\backupfolder\archive.rar rem Create the archive "C:\Program Files\WinRAR\rar.exe" a -r %destination% %source% echo Done!
Note that this is just an example, and you may need to modify the paths to match your specific setup. Additionally, you must have WinRAR installed on your computer in order for this script to work.
Comments
Post a Comment