Move files up inside selected folder

Hello, :wink:
I had this button before, but accidentally rendered it useless.

So I searched through the forums all day long but could just find analogical buttons that move selected files up and delete nestled folder.

What I would like DOpus to do:
Copy files inside selected folder(s) and move them here.

root\ [We're here]
root\SubFolder 1
root\SubFolder 2\ [this folder is highlighted]
root\SubFolder 2\file1.txt
root\SubFolder 2\file2.txt

Now if "Subfolder 2" is selected, it should move "file1.txt" and "file2.txt" to current location.

I know this button already exists, but I couldn't find it... :frowning:
Thx for help.

Maybe this helps: Quick buttons for directory organisation

This code copies the files:

@dirsonly
@nofilenamequoting
Copy FILE "{filepath$}*" HERE

This code moves the files and deletes the folder:

@dirsonly
@nofilenamequoting
Copy MOVE FILE "{filepath$}*" HERE
delete

That worked!!
Thanks a lot :slight_smile:

@xbprm: have seen those buttons before but they don't do what I was looking for, as described in the first post.
Christiaan hit the bull's eye.

I finally found back this topic i was searching for.

Im having trouble with this command

@dirsonly
@nofilenamequoting
Copy MOVE FILE "{filepath$}*" HERE
delete

when i use the above command on a folder with multiple subfolders with same name i get an error. How can i solve this.

anybody ?? :frowning:

How about an example dir structure and specific error message that you're getting? I tried a little test and didn't have a problem, so not sure what to tell you...

@steje
Create the following dir structure:
G:\Folder\Folder\Folder\Folder
and put a file in each folder with the same name e.g "clip.txt".
Go to "G:", select "Folder" and use the Button on it. You will get an "Folder is not empty" error message.
Thats the Problem of OpelOpus I think.
The other Problem is copying multiple files with the same name to one directory. For this I use the following to rename the files automatically:

@dirsonly @nofilenamequoting Copy MOVE FILE WHENEXISTS=rename "{filepath$}\*" HERE delete

Kundal, yes thank you very much. that was exactly my problem. :slight_smile:

But your Problem isn't solved I think? "WHENEXISTS=rename" only renames Files with the same name but not Folders.
You get the "Folder is not empty" error message because you're trying to copy a Folder to a path where a Folder with the same name already exists.
This is not possible unless the Folders to copy are renamed to e.g. "Folder(1), Folder(2)...".
"WHENEXISTS" doesn't do that and another existing Argument "RENAMEWHENSAME" doesn't seem to have any effect here.
I couldn't find a solution for that up to now.

Yes kundal you are right. Only the files were renamed and not folders. :frowning: i thought problem was solved. And sometimes i dont even get warning. It just deletes the underlying subfolders with same name and the file inside the last subfolder down is then lost. I can do a control + z of course to retrieve that file.

But a solution for this would be nice.