Windows 10: Move all files inside folders to parent directory Solved

  1.    19 Nov 2015 #1

    Move all files inside folders to parent directory


    Hello,

    First of all, I would like to apologize if this topic is not in the correct forum.

    My problem is the following:
    I have a folder (let's call it BASKET), inside that folder I have many other folders (for the sake of the example, I will name for example 3 folders - banana, apple, and cucumber). These 3 folders (in my case its many many folders) have files in them. I would like to move those files (from banana, cucumber, and apple) to the BASKET folder. The folders are so many, it's tedious to go in each one and move the files back one by one.

    Can anyone help me out on how to achieve that in a geeky way? Some sort of batch file? A windows trick that I have not heard of?

    Regards,
    tonykaram1993
      My ComputerSystem Spec

  2.    19 Nov 2015 #2

    What you need is a file manager that can 'search' recursively from the context menu.

    I work with, 99% of the time, XnView (Classic). I have done what you want to do, by right-clicking the parent folder in the navigation panel, and selecting 'show all files' recursive search. The file manager/browser will then allow you to 'browse', and list the entire contents of the parent folder and all of its sub- and sub-subfolders. Ctrl-A selects all and you just slide/drag to the parent folder.

    The problem you may run into is duplicate filenames that will end up in the same parent folder. Map out a strategy beforehand.
      My ComputerSystem Spec

  3.    20 Nov 2015 #3

    pyramid10 said: View Post
    What you need is a file manager that can 'search' recursively from the context menu.

    I work with, 99% of the time, XnView (Classic). I have done what you want to do, by right-clicking the parent folder in the navigation panel, and selecting 'show all files' recursive search. The file manager/browser will then allow you to 'browse', and list the entire contents of the parent folder and all of its sub- and sub-subfolders. Ctrl-A selects all and you just slide/drag to the parent folder.

    The problem you may run into is duplicate filenames that will end up in the same parent folder. Map out a strategy beforehand.
    You just gave me an idea and it worked. I went to the BASKET folder and searched for the extension of the files (in my case its .mp3) then cut and pasted all the files where I wanted. Obviously this won't work for multiple extension (maybe you can search for .* ?). But thanks anyway since you gave me that idea.

    Peace.
      My ComputerSystem Spec

  4.    20 Nov 2015 #4

    If you don't have nested folders something like this would do it - otherwise you would have to keep repeating it.

    Assuming your folder "Basket" is on your desktop...

    Code:
    cd %userprofile%\Desktop\Basket
    for /d %i in (*) do move "%i\*" %userprofile%\Desktop\Basket
    What it is doing is changing the working directory to basket then for each directory inside it (that is the /d flag) move everything it contains to the path defined basket again).

    It will prompt you if you there are duplicate names.
      My ComputerSystem Spec


 

Related Threads
Clean install of w10. I am signed in w/a local account which is also an admin account on the PC I'm saving/moving too. I have read/write access to these folders but I cannot save to the folders. Any idea what's going on? 33597
move user directory stange problem after moving in User Accounts and Family Safety
Hi On win7 i did the following. And i found it musch easyer then what is in the tutorials Users Folder - Move Location in Windows 10 - Windows 10 Forums Did some nows if it works on win 10. On windows 7 i did the following Did a full...
Hi everyone, I've had Windows 10 final release installed on my pc for a couple of days, and it has been proving a quite good experience. I just came across something though. I was editing a cpp file in Notepad++ and wanted to save it to a newly...
25771 I just noticed some change in the Get Windows 10 app..
Hi! Any applications which give me a save dialog box don't allow me to save inside my user folder, for example saving an .ai file in Adobe Illustrator or an OBJ file from Cinema 4D. This started after updating to build 10240. When saving, I receive...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 08:29.
Find Us