winrar

Batch script to zip all the files without the parent folder

眉间皱痕 提交于 2019-12-30 18:32:33
问题 I wanted to create a batch file that can make a zip file from a folder that I put in the script. Here's my script: @REM ------- BEGIN xpi.bat ---------------- @setlocal @echo off set path="C:\Program Files\WinRAR\";%path% winrar.exe a -afzip -m5 -ed -pTest -r c:\test.zip c:\MyFolder REM ------- END xpi.bat ------------------ The script above creates a zip file with a structure like this, MyFolder --subFolder1 --subFolder2 --file1.txt --file2.doc --file3.js But what I want the zip file that is

Batch script to zip all the files without the parent folder

白昼怎懂夜的黑 提交于 2019-12-30 18:30:24
问题 I wanted to create a batch file that can make a zip file from a folder that I put in the script. Here's my script: @REM ------- BEGIN xpi.bat ---------------- @setlocal @echo off set path="C:\Program Files\WinRAR\";%path% winrar.exe a -afzip -m5 -ed -pTest -r c:\test.zip c:\MyFolder REM ------- END xpi.bat ------------------ The script above creates a zip file with a structure like this, MyFolder --subFolder1 --subFolder2 --file1.txt --file2.doc --file3.js But what I want the zip file that is

批处理命令调用WINRAR对文件进行压缩

只愿长相守 提交于 2019-12-30 02:47:43
批处理命令(rar.bat): c: cd/ cd C:/Program Files/WinRAR winrar a -ep1 -o+ -p password -inul -r -ibck C:/RarFile E:/BigFile 其中,a是压缩命令, -ep1 -o+ -p -inul -r -ibck 是参数 ep1:排除基准文件夹,不然压缩包会包含待压缩文件夹所在的完整路径 o+:覆盖已经存在的文件 p:密码,后面红色的部分就是密码,紧贴这个参数P,看起来有点怪 inul:禁止出错信息 r:连同子文件夹操作 ibck:后台模式运行 C:\RarFile 压缩文件 E:\BigFile 等待压缩的源文件 更多帮助信息,可以打开WINRAR,然后看它的帮助。 将以上批处理命令写到一个批处理文件里,然后用任务计划来定期运行这个批处理文件,就可以定期压缩某些文件鸟。比如说,夜深人静的时候,机器自动压缩庞大的数据库备份文件。 来源: https://www.cnblogs.com/leftfist/archive/2010/12/09/4258142.html

批处理命令调用WINRAR对文件进行压缩

早过忘川 提交于 2019-12-30 02:45:58
命令: winrar a 参数 压缩后的文件 压缩源文件 如压缩apk文件,代码如下 echo apk文件不能直接下载,所以压缩apk成rar来下载 d: cd D:\Program Files\WinRAR (切换到WinRAR安装目录) winrar a -ep1 -o+ -inul -r -iback D:\CI\jenkins-1.620\xxx.rar D:\CI\jenkins-1.620\xxx.apk echo 压缩完成 其中,a是压缩命令, -ep1 -o+ -p -inul -r -ibck 是参数 ep1:排除基准文件夹,不然压缩包会包含待压缩文件夹所在的完整路径 o+:覆盖已经存在的文件 p:密码,后面红色的部分就是密码,紧贴这个参数P,看起来有点怪 inul:禁止出错信息 r:连同子文件夹操作 ibck:后台模式运行 http://blog.csdn.net/hwhua1986/article/details/48131529 来源: https://www.cnblogs.com/qmfsun/p/6544817.html

SFX run file after extraction depending on OS bitness

江枫思渺然 提交于 2019-12-25 16:48:54
问题 I need to create self-extracting archives that, once extracted, run different executables depending on the bitness of the Operating System. Until now, I have done this by use of WinRAR and BAT files but the quick flash of the Command Prompt window prior to the main application's window looks suspicious. So, I'm looking for a better option but have yet to find one. 回答1: You could code a 32-bit GUI application in C/C++/C# not opening a window which for example determines with getenv_s or getenv

How to create a RAR archive with date of the archived folder in archive file name?

妖精的绣舞 提交于 2019-12-24 05:41:10
问题 The cloud service Dropbox used by me does not preserve the original time stamp of uploaded folders. I have to use the WinRAR to compress the folder to backup in the cloud to keep the original folder date/time before I upload it to Dropbox. But I could not find an easy way to create the archive file name with the current last modification date of the folder in format YYYYMMDD in file name of archive file. The command line for %I in ("d:\doc\aatmp") do @echo %~tI executed in a command prompt

Using WINRAR with batch script

风格不统一 提交于 2019-12-24 01:19:50
问题 I am new to scripting, can some please assist me, I have batch file that Looks at the first 8 characters in the file name, creates and moves those files to new folder with first 8 characters as folder name. Then looks at folder created in step 1 for next four series of character (9,10,11,12)and create and move to another subfolder with next 4 characters as folder name. Then looks at folder created in step 2, for extension of every file and create and move to a new folder with extension as

How to extract all zip files in a folder using winrar with the same name as the zip?

ぃ、小莉子 提交于 2019-12-22 01:36:13
问题 I need to iterate a folder and for each zip file I need to extract it with the name of it. That is, if its test.zip then it should extract to test folder. Similarly it should iterate through my folder and its child folders and extract the things. I wrote the below code but it doesn't extract with the name of the zip. Please advice. cd %CD%\Setups for /r %%i in ("*.zip") do ( echo "%%~fi" "C:\Program Files (x86)\WinRAR\WinRAR.exe" a -afzip "%%~dpi" "%%~fi" echo came after unzipping del /S /Q "

How to unpack all rar archives in all subfolders of a folder and then delete the archives?

谁都会走 提交于 2019-12-21 20:34:06
问题 I want to unpack all files in some subfolders which are in a main folder, delete the xxx.rar files after unpacking and move the folder with the files to another location. Main Folder Sub Folder1 (with .rar files) Sub Folder2 (with .rar files) Sub Folder3 (with .rar files) This my batch script and works so far. SET "sourcefolder=C:\Users\Unpack" FOR /R %sourcefolder% %%X in (*.rar) do ( pushd "%%~dpX" "C:\Program Files\WinRAR\Rar.exe" x -y "%%X" "*.*" && del "*.rar" popd ) for /d /r

Batch file to compress subdirectories

China☆狼群 提交于 2019-12-21 05:06:09
问题 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