Create a batch file to archive all subfolder in the folder d:\MyData and move it to d:\MyDataArchvies using winrar archive tool
To create a batch file to archive all subfolders in the folder d:\MyData and move it to d:\MyDataArchives using the winrar archive tool, you can use the following steps:
- Open a text editor, such as Notepad, and type the following commands:
Save the file as
archive-mydata.batin the folderd:\MyData.To run the batch file, double-click on it or open a command prompt and navigate to the
d:\MyDatafolder and typearchive-mydata.bat. This will create a.rararchive file for each subfolder in thed:\MyDatafolder and move it to thed:\MyDataArchivesfolder.
Note: The above instructions assume that the winrar executable is installed in the default location (C:\Program Files\WinRAR\Rar.exe). If it is installed in a different location, you will need to update the path in the batch file accordingly. Additionally, the -ep1 and -inul flags in the Rar.exe command are used to exclude the parent directory and prevent displaying any messages during the archiving process.
Comments
Post a Comment