Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move/Copy file to predefined location #545

Open
aronmgv opened this issue Oct 25, 2024 · 4 comments
Open

Move/Copy file to predefined location #545

aronmgv opened this issue Oct 25, 2024 · 4 comments

Comments

@aronmgv
Copy link

aronmgv commented Oct 25, 2024

Hello.

I want to achieve a context menu section which will be named e.g. CONVERT and it will have submenu which will do a "move" of a file/s to predefined folders:

image

Is it possible please? Thanks!

@a4d8b3
Copy link
Contributor

a4d8b3 commented Oct 26, 2024

menu (title='Convert' type='file' mode='multiple')
{
    item(title='Folder A' cmd=io.move(sel.path,path.join('Your Directory',sel.name))  invoke=1)
    item(title='Folder A' cmd=io.move(sel.path,path.join('Your Directory',sel.name))  invoke=1)
    item(title='Folder A' cmd=io.move(sel.path,path.join('Your Directory',sel.name))  invoke=1)
}

This will move all the selected files to the specified path. replace 'Your Directory' with the actual path.

@aronmgv
Copy link
Author

aronmgv commented Oct 26, 2024

Hey. Thanks for the reply, it works! However I dont see the explorer moving dialog.. It just moves somewhat in the background and the file disappears.. is there a "explorer" function to move files? So it triggers the moving dialog?

@a4d8b3
Copy link
Contributor

a4d8b3 commented Oct 27, 2024

No idea about native functions. you could give powershell a shot, but that would have its own quirks:

item (
    title="Folder A"
    cmd-ps=`$t=New-Object -ComObject 'Shell.Application';($t.Namespace('Your dir here')).movehere('@sel.path')`
    window='hidden'
    invoke=1
    mode='multiple'
)

@RubicBG
Copy link
Collaborator

RubicBG commented Oct 27, 2024

  • some notification can be added at the end where it takes time to complete the operation (for example when moving from c:\ to d:)
  • a ps command can be added to show the Progress Bar when moving, but the ps panel must be visible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants