Getting started with user defined commands like move and extract

I was able to create a simple user-defined command to copy a file to an alias folder.

COPY TO={alias}

But as happy I was to get started I quickly got lost.

  • How can I create a function to move a file to an alias? The following gives me a "Windows cannot find 'MOVE' warning

MOVE File={alias}

  • I also want to create a command to extract a myarchive.zip to a folder "myarchive" in the same directory.

  • I also tried to use the WSL script function, but then it always pops open a console window (which is super annoying). Can you execute commands without opening an external window?

Thx
Jan

COPY MOVE TO={alias} ' move

COPY EXTRACT=sub HERE ' unzip to directory

Thank you for your response. The unzip functionality works great :slight_smile:
The move function (and my copy function that I mentioned) doesn't copy or move the file to the alias, but to the other tab. So if I execute the command via the command prompt

`>mo /myalias

it doesn't move the file to /myalias, but to the other tab. I guess my use of alias is wrong.

You would need to use the alias name. i.e. COPY TO=/dropbox

That's what I'm trying to do. Here below an image with a selected file and the command that I'm executing. The file just moves to the other lister instead of the downloads folder

dopus_move_command

After a lot of trial and error and your help I think I found the solution:

COPY MOVE TO="&alias&"

dopus_move_command_working

That won't work because you have defined the alias. There are loads of aliases on your system so you need to tell Opus which one to copy/move to. To copy or move selected files to your downloads folder you need a command like COPY MOVE TO=/downloads or COPY TO=/downloads

You can find all your aliases here: Preferences / Favorites and Recent / Folder Aliases

I think the aim is to type the alias when running the command:

d3e7e33d8e9c250532cbb4da99e6a7eec547ed50

jtourlamain's last post looks correct if the aim is for a user command which takes an alias as its argument.

That's correct Leo. The goal was to have a short command to move a file to a certain alias. In fact, with the solution you can use aliasses as well as normal paths.