Upload folder content, and delete folder

In Opus 12, with the following code I managed to upload all the content of the folder I was in to the top level (parent folder) and then delete it, but now, experiencing Opus 13 Beta, I manage to upload the files, but not delete the folder, could someone help me?

@set ChildPath={sourcepath$|noterm}
Copy MOVE * TO ..
Go ..
Delete FILE={$ChildPath} QUIET

The version from Quick buttons for directory organisation works. (The root post in that thread was updated recently, so you may have an older version of the command.)

The quotes on the last line are the main thing, but I would also add the NORECYCLE SKIPNOTEMPTY so it doesn't delete folders that still contain files (which can happen if a nested folder has the same name as the parent).

@set ChildPath={sourcepath$|noterm}
Copy MOVE * TO ..
Go ..
Delete FILE="{$ChildPath}" NORECYCLE SKIPNOTEMPTY QUIET
1 Like

Thank you very much @Leo, very kind as always. Version 12 was already good, this 13 will be even better!!!

3 Likes