Func.Command.files resolves wrong filename if {f} not used when a file is selected in an archive


ex. 1 :

Using this command, if i select a file(info.txt) in an archive( Func.Command.files will return :

ex. 2 :

If i remove the {f} argument and i select the same file, Func.Command.files will return :\info.txt :thinking:


{f} or {filepath} are generally for passing files to external programs, which will almost never understand archive paths.

When using them, Opus will typically extract files inside archives (or on FTP sites) to a temp directory and pass those to the program you want to run on them.

You can use @nolocalizefiles in a button/command to prevent that.

ok, but i would like to receive the temp directory in Func.Command.files without using the {f} argument ?

You script would have to extract the files to the temp dir itself to get that.

The scripting API provides ways to make (and automatically clean up) temp files/dirs, which can help there.

Easy way is to continue to use {f} argument because Func.Command.files will return the full path to temp directory file.