Page 1 of 1

Move files from subfolder to parent folder

Posted: 05 Sep 2019 01:30
by kluv
HI All,

Is there a way to select multiple subfolders and have the content inside moved to the parent folder?

Thank you for your help.

Re: Move files from subfolder to parent folder

Posted: 05 Sep 2019 01:54
by highend
Configuration | General | Menus, Mouse, Safety | Context Menus | File List...
[x] Flatten Folder [folders only]

Re: Move files from subfolder to parent folder

Posted: 05 Sep 2019 05:02
by kluv
Thanks but this isn't it. I needed the files inside the subfolder moved to the parent folder. Unless, I did something wrong or missed a step "Flatten Folder" only moves the folders.

Appreciate the quick reply!!

Re: Move files from subfolder to parent folder

Posted: 09 Sep 2019 13:53
by admin
No, such a command does not exist ATM. Would be something like "extract here" for folders (instead of archives).

Re: Move files from subfolder to parent folder

Posted: 09 Sep 2019 14:07
by highend
Or simply be scripted...

Code: Select all

    setting "BackgroundFileOps", 0;
    foreach($selected, <get SelectedItemsPathNames |>, , "e") {
        if (exists($selected) != 2) { continue; }
        $files = quicksearch("/f", $selected, "|", "s");
        moveto , $files, , 1, 0, 4;
    }
The empty sub directories aren't deleted by the script... Should they?

Re: Move files from subfolder to parent folder

Posted: 06 Apr 2020 21:41
by haaranoos
Hello highend.
the script doesn't work for me.

Re: Move files from subfolder to parent folder

Posted: 06 Apr 2020 21:55
by highend
And you did what exactly? How many folders where selected, where there any files inside them?

Re: Move files from subfolder to parent folder

Posted: 18 Oct 2025 15:51
by kubbie
highend wrote: 09 Sep 2019 14:07 Or simply be scripted...

Code: Select all

    setting "BackgroundFileOps", 0;
    foreach($selected, <get SelectedItemsPathNames |>, , "e") {
        if (exists($selected) != 2) { continue; }
        $files = quicksearch("/f", $selected, "|", "s");
        moveto , $files, , 1, 0, 4;
    }
The empty sub directories aren't deleted by the script... Should they?
Is there a way to tag multiple dirs to move as this only does 1 folder?

Re: Move files from subfolder to parent folder

Posted: 18 Oct 2025 15:59
by highend
The script processes multiple selected folders as well, as long as they have the same parent dir

Re: Move files from subfolder to parent folder

Posted: 18 Oct 2025 17:39
by kubbie
highend wrote: 18 Oct 2025 15:59 The script processes multiple selected folders as well, as long as they have the same parent dir
I'm not sure what I'm doing wrong then cause if I selected 2 or more folders it doesn't move anything but if I select 1 folder then it moves it correctly. Can you show me the light?

Here is my folder structure:

d:\temp\
d:\temp\test1\move1.txt
d:\temp\test2\move2.txt
d:\temp\test3\move3.txt

I'm trying to move all 3 of those files to d:\temp