Code Modification

I currently have the following command for a toolbar button:

@nodeselect Copy MOVE "{filepath}\*" to={sourcepath} Delete
It brings the content of the selected folders to the parent folder and deletes the selected folders

It works fine, but the problem is..

  1. When nothing is selected, it moves the contents of the root directory to the viewed folder :confused:
  2. When a file is selected, it gets deleted

I would like the button remain silent when a folder is not selected..
Plz help!

[quote="anjan_oleti"]I currently have the following command for a toolbar button:

@nodeselect Copy MOVE "{filepath}\*" to={sourcepath} Delete
It brings the content of the selected folders to the parent folder and deletes the selected folders

It works fine, but the problem is..

  1. When nothing is selected, it moves the contents of the root directory to the viewed folder :confused:
  2. When a file is selected, it gets deleted

I would like the button remain silent when a folder is not selected..
Plz help![/quote]

Use the following code:

@dirsonly @nodeselect Copy MOVE "{filepath$}\*" to={sourcepath} Delete

Put @dirsonly at the top and use {filepath$} instead of {filepath}:

@dirsonly @nodeselect Copy MOVE "{filepath$}\*" to={sourcepath} Delete

Edit: Posted at the same time as searcher123. Great minds think alike. :slight_smile:

Thanks to all the Great Minds and Sweet Hearts on this forum :stuck_out_tongue: