How do you have user made commands run in order?

I'm having a problem.
I'm trying to have it extract some files, then delete the archives.

If i'm in msdos batch function it deletes all the archives before the files get extracted, so I get an error about no archives found.
If i have it in the normal opus function, it will manage to extract the first archive before they all get deleted.

It seems that the files get unselected when I hit the button, so if i decided to just make it a 2 button hitting thing, I have to select the files again (twice), which against the point, since I'm trying to automate what i'm doing.

this is what I have:
"E:\Program Files\WinRAR\WinRAR.exe" x -o- {file$} *
Delete FILE FORCE QUIET RECYCLE

I even put a: @nodeselect above both of those, but that didn't change anything.

If i change the {file$} to {file} instead of just 1 popup saying no archives to extract, I get 4 saying that.

how do I make it do the commands in order?

wish winrar would make the -df switch for extracting from archives, then I wouldn't be having this problem.

I'm not using the built in Opus Zip functions because the files sometimes the files are in rar format. even more rarely are files in 7z format.

thanks

Try adding "sync: " at the start of the two lines. I haven't used it much myself but my understanding is that it ensures that external and internal commands execute in-order and not asynchronously.

sync: huh? cool, I will try that.

thanks

it looks like sync: will work, except after it does the first line (winrar extract) it deselects what was selected. So when it gets to the delete, there is nothing selected. lame.

any ideas on how to keep things selected between commands? I would think that it would be the default behavior. After all, it's made to have more then 1 line. I'm sure it's because I'm running an external program, but it should matter (well, to me it shouldn't matter).

any ideas on that now, would greatly be appreciated.

thanks

(oh, I would of just edited my last post, but i installed some new extensions and it's cutting off the edge of window now, with no scroll bar to adjust. think it's because I have too much stuff in the status bar.)

Looking at the command, I think you should remove the FILE argument to the delete command. That's for specifying a particular file and will probably stop it working in this case where you want it to work on the selected files instead. (The command is probably trying to delete a file called "FORCE" :slight_smile:).

If that doesn't solve it, I think adding a 3rd line with @nodeselect should.

If even that doesn't work then you could cheat by turning the delete line into an external command using something like

dopusrt /cmd delete FILE {file$} FORCE QUIET RECYCLE

oh, I got you. I misunderstood when I read. I had thought it meant that if you just have the word FILE that it will do what's selected.

still didn't delete them though

okay, this is what worked:
sync:"E:\Program Files\WinRAR\WinRAR.exe" x -o- {file$} *
sync:dopusrt /cmd delete FILE {file$} FORCE QUIET RECYCLE

no matter what I did, I could not get it to delete files using the delete command. As a matter of fact, if I changed the "MSDOS Batch Function" to the "Standard Function (Opus or External" is would tell me:
Windows cannot find 'Delete'. Make sure you typed the name correctly, and then try again. To search..."

so, I guess that is telling me that the delete command is broken or something? let me see if it does it if I take the sync: off

ah, it does. okay, this will work also:
sync:"E:\Program Files\WinRAR\WinRAR.exe" x -o- {file$} *
Delete FORCE QUIET RECYCLE
@nodeselect

i had put the sync: in front of the delete because I thought that I was supposed it put it in front of all the lines that I wanted to run in order. guess not.

okay, cool. I really appreciate all the help I got.

thank you

Robert

Ah, sorry about that. I guess sync: should only be used before the external commands.

Glad it's working now!

From the Opus v9.0.0.7 release notes: