How to move all contents to parent & Delete original folder

How to Move All Contents (not selected contents) to the parent folders & Delete the Original folder?

@set ChildPath={sourcepath$|noterm}
@runmode hide
Copy MOVE * TO ..
Go ..
rmdir {$ChildPath}

This Code worked for me in the previous version, but in the current version all content moved successfully but the original folder does not delete.

That should still work, although rmdir will only work if the button is set to MS-DOS mode, since it's a DOS command.

These days, you can avoid using rmdir (and thus MS-DOS mode, and also the @runmide hide line which was there to hide the DOS window) by using this instead:

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

Thanks Leo, your code works fine but it's show a confirmation dialog for delete the folder, I don't want the confirmation dialog, I want to delete the folder without confirmation, Is that possible?

Add the QUIET on the last line.

1 Like

This code works fine. Thanks Leo

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