1.    19 Nov 2015 #1
    Join Date : Nov 2015
    Posts : 2
    Windows 10

    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
    Join Date : Jul 2015
    Posts : 202
    win 10 home

    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
    Join Date : Nov 2015
    Posts : 2
    Windows 10
    Thread Starter

    Quote Originally Posted by pyramid10 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
    Join Date : Jul 2015
    Posts : 3,822
    10 Pro

    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

 


Similar Threads
Thread Forum
Access to shared folders but no access to save or move files
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
Network and Sharing
move user directory stange problem after moving
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...
User Accounts and Family Safety
New folders are created in the OneDrive directory, how to change this?
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...
General Support
New files added in GWX directory
25771 I just noticed some change in the Get Windows 10 app..
General Support
Solved Apps will not save files inside User folder.
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...
Software and Apps
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 02:16.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums