Results 1 to 12 of 12
  1. #1
    New Lounger
    Join Date
    Nov 2017
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mass move folders?

    Hello WS,

    I have a little question. I have a massive file structure. I was wondering if I could change this file structure with a program or script.

    My file structure is now like this:

    -folder 1
    -folder 2
    -folder 3

    This also faries a little. for instance:

    -folder 1 - test
    -folder 2 - something
    -folder 3 - something else

    What would be amazing is something like this

    -folder
    --folder 1
    --folder 2
    --folder 3

    and with the varies something like:

    -folder
    --folder 1 - test
    --folder 2 - something
    --folder 3 - something else

    I was planning to do this by hand but with 10000 folders its alot of time consuming.
    I was hoping there is an easy way to do this
    Last edited by defeatenonce; 2017-11-12 at 10:12.

  2. #2
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    9,202
    Thanks
    67
    Thanked 1,137 Times in 1,060 Posts
    That's easy using DOS commands or Powershell, but we need more details of the 10000 folders as I suspect it won't be as straight forward as your description - you don't really have 10000 folders numbered 1 to 10000?

    cheers, Paul

  3. #3
    Silver Lounger RolandJS's Avatar
    Join Date
    Dec 2009
    Location
    Austin metro area TX USA
    Posts
    1,956
    Thanks
    111
    Thanked 147 Times in 144 Posts
    I would recommend, after making a full image onto external media, using a very strong, yet EZ-to understand and use, 3rd party file manager program, whether free or pay-for. Once you have written down your basic "dress pattern" (to borrow from another industry) or a "cookie cutter pattern" -- then you begin to create the master folders, and move one block of sub-folders into place at a time.
    AND, do not be "foreground-using" this computer, doing other things, during this process.
    Last edited by RolandJS; 2017-11-19 at 22:13.
    "Take care of thy backups and thy restores shall take care of thee." Ben Franklin revisited.
    http://collegecafe.fr.yuku.com/forum...-Technologies/
    Backup, backup, backup! -- Lady Fitzgerald (sevenforums)
    Clone or Image often! Backup, backup, backup, backup... -- RockE (Windows Secrets Lounge)

  4. #4
    New Lounger
    Join Date
    Nov 2017
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Folder structure

    Quote Originally Posted by Paul T View Post
    That's easy using DOS commands or Powershell, but we need more details of the 10000 folders as I suspect it won't be as straight forward as your description - you don't really have 10000 folders numbered 1 to 10000?

    cheers, Paul
    Hi Paul,

    Oright so the stucture is like this

    https://i.imgur.com/LOW9mCY.png

    but then times alot more.

    Cheers


    Quote Originally Posted by RolandJS View Post
    I would recommend, after making a full image onto external media, using a very strong yet EZ-to understand and use 3rd party file manager program, whether free or payp-for. Once you have written down your basic "dress pattern" (to borrow from another industry) or a "cookie cutter pattern" -- then you begin to create the master folders, and move one block of sub-folders into place at a time.
    AND, do not be "foreground-using" this computer, doing other things, during this process.
    I am sorry I am not really following you? Are you saying to do it all by hand?
    Last edited by defeatenonce; 2017-11-13 at 13:34. Reason: Saying hello is kinda nice.

  5. #5
    Silver Lounger RolandJS's Avatar
    Join Date
    Dec 2009
    Location
    Austin metro area TX USA
    Posts
    1,956
    Thanks
    111
    Thanked 147 Times in 144 Posts
    Yes, I'm recommending doing it by hand only because I know of no way to automate that process However, if others come with a much faster process -- go for it. Again, whatever you decide to do, first make a full image backup onto external media.
    "Take care of thy backups and thy restores shall take care of thee." Ben Franklin revisited.
    http://collegecafe.fr.yuku.com/forum...-Technologies/
    Backup, backup, backup! -- Lady Fitzgerald (sevenforums)
    Clone or Image often! Backup, backup, backup, backup... -- RockE (Windows Secrets Lounge)

  6. #6
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    9,202
    Thanks
    67
    Thanked 1,137 Times in 1,060 Posts
    I was going to suggest creating a folder with the starting letter and then moving the numbered ones under it, but I see you already have an "e" folder. What names do you want to use for the "holding" folders?

    cheers, Paul

  7. #7
    New Lounger
    Join Date
    Nov 2017
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    I dont mind if they just get merged into that folder so all the e folders go into 'e'

    Cheers.

  8. #8
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    9,202
    Thanks
    67
    Thanked 1,137 Times in 1,060 Posts
    Do all folders start with a single letter, then space?

    cheers, Paul

  9. #9
    New Lounger
    Join Date
    Nov 2017
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Paul T View Post
    Do all folders start with a single letter, then space?

    cheers, Paul

    oohh I think you got the wrong idea. That was just an example I quickly but together because I couldnt reach the files that day. But its all random titles between 4 characters to 20 characters or maybe even longer. But there is always a space between the number and the title.

    so like:

    asdfasdf 1
    asdfasdf 2
    testsomething 1
    testsomething 2
    testsomething 3
    testsomething 4
    else
    else 1
    else 2
    whatever 1
    whatever 2
    whatever 3
    cheese 1
    cheese 2
    cheese 3

    Cheers.
    Last edited by defeatenonce; 2017-11-19 at 14:42.

  10. #10
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    9,202
    Thanks
    67
    Thanked 1,137 Times in 1,060 Posts
    Here's a quick 'n dirty script to do the work. It only works on the current directory but that should be enough.

    Create a new Powershell file in the directory you want to consolidate, e.g. MoveDirs.ps1
    Edit the file and add these commands.
    Code:
    $Dirs = Get-ChildItem -Directory
    foreach ($Dir in $Dirs) {
    	$Arr = $Dir.Name.split()
    	if ((Test-Path $Arr[0]) -eq $False) {md $Arr[0]}
    	if ($Arr.length -gt 1) {move $Dir $Arr[0]}
    }
    Save the file.
    Open a Powershell window. Windows + R, powershell
    Change to the directory where you created the file, e.g. cd C:\BigFolder
    Run the Powershell script, e.g. .\MoveDirs.ps1

    How to enable scripts in Powershell.
    https://technet.microsoft.com/en-us/.../ee176961.aspx

    Backup first, of course.

    cheers, Paul

  11. #11
    WS Lounge VIP mrjimphelps's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    4,030
    Thanks
    540
    Thanked 474 Times in 443 Posts
    I'll bet Robocopy, with a script file, would do the job for you. I have heard a lot of good things about Robocopy, although I've never used it myself.

    Here's some great information about Robocopy:
    https://www.sevenforums.com/tutorial...up-script.html

  12. #12
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    9,202
    Thanks
    67
    Thanked 1,137 Times in 1,060 Posts
    Robocopy will do the move, but not the analysis of existing directories. As you need a script file to do that you can also use it for the move.

    cheers, Paul

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •