Rar.exe CLI - add files from directory without directory structure?

Posted by Vercas on Super User See other posts from Super User or by Vercas
Published on 2014-06-05T19:59:06Z Indexed on 2014/06/05 21:29 UTC
Read the original article Hit count: 230

Filed under:
|

I need to grab every file in a folder and shove it into a RAR archive.

This is my current method:

"C:\Program Files\WinRAR\Rar.exe" a -r -md2m -s -m5 -ma4 -t ..\Releases\vCommands.rar bin\

... Where bin is my folder. I tried this too, even though it is for another program, and the results are the same.

To be clear, here's a picture:
difference

To the top-left, in the .rar file, there is the bin directory which contains all the files.
To the bottom-right, in the .7z file, all those files are in the archive root.

What I need is shoving all those files in the .rar archive root, instead of a folder, without having to execute my batch file inside that bin folder.

© Super User or respective owner

Related posts about rar

Related posts about winrar