Batch file to compress subdirectories
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to write a batch script that will run automatically compressing subdirectories using winrar or 7-zip: Example: My Pictures Pics1 (Pics1.zip) File1.jpg File2.jpg File3.jpg Pics2 (Pics2.zip) File4.jpg File5.jpg Pics3 (Pics3.zip) File6.jpg File7.jpg ... How do i write script. 回答1: (1) Using WinRAR: WinRAR includes two command-line tools, rar.exe and unrar.exe , where rar.exe compresses and unrar.exe uncompresses files. Both are located in the C:\Program Files\WinRAR folder in the installable version. Assuming, if there are multiple