Delete files from rar archive

Hi,

What would it be the command sequence to delete files from inside a rar archive viewed with VSF rar plugin using the command line rar.exe.

For example let's say we have and archive Opus.rar that contains 3 files:

opus.exe opus.read me opus.url
I want to select opus.readme and opus.url from inside opus and delete them pressing a button.
If i do this from CMD window it would be something like...

rar.exe d c:\Opus.rar "opus.read me" opus.url

Can i do that from DOpus itselt?

This should work, but only in the root of the RAR, not in any subdirectories within the RAR:

@nolocalizefiles rar.exe d {sourcepath$|noterm} {allfile$}

The @nolocalizefiles line tells Opus to just pass the filenames as they are. (Normally if Opus passes a filename within an archive or FTP site to another program it will first copy/extract that thing to a temporary directory and pass the name of the temp file to the program, since the other program is unlikely to understand RAR files or FTP sites.)

The reason this command won't work in subdirectories within RAR files is that the subdirectory will be passed as part of {sourcepath$|noterm} and not in the {allfiles$} path(s), which will confuse rar.exe. I expect the only way to work around that would be to write a small VBScript which you would run instead of rar.exe. That script would split the path appropriately and then call rar.exe.

It's a shame there still is no proper way to integrate rar creation/modification into other programs other than calling stuff via the command line. :frowning:

Thank you very much leo.
I was trying myself with dopus commands and had reached just this..

sync:"C:\Program Files\WinRAR\Rar.exe" d {filepath} {file}

that that doesn't work.

Again, thanks for you help :slight_smile: