Results 1 to 4 of 4

Thread: Batch Folder Creation and File Moving

  1. #1

    Batch Folder Creation and File Moving

    Ok then, so, in need of some major geek assistance here.

    I have a load of files currently in a folder and I want to put each into folder of its own within the same directory. Each folder should have the same name as the file it contains (in short I want all my movies moved from the "movies" folder, into "movies\moviename".

    Is there any way I can do this quickly with either a script of some kind, or is there a clever program out there that can do it for me? I'd really like to avoid doing it manually with over 200 files.

  2. #2

    Da FAC?


    476vFG GC
    Founding member
    Stuka's Avatar
    Belgium
       Belgium
    Join Date
    Mar 2012
    Posts
    8,272

    Awards Showcase

    Thanks Thanks Given 
    1,251
    Thanks Thanks Received 
    5,796
    Thanked in
    2,528 Posts
    Powershell script.
    Edit the first line to have your source folder.

    Code:
    $folder = "c:\temp"
    
    Get-Childitem $folder | %{
        $newdir = $folder+"\"+$_.BaseName
        New-Item $newdir  -type directory
        Move-Item $_.fullname -Destination $newdir    
    }

    Providing CAS when you're all out of HUA!

  3. The Following 2 Users Say Thank You to Stuka For This Useful Post:

    Eddie (21Jan17), Energy (17Jan17)

  4. #3

    TWOT


    76th vFS Squadron Command
    Oliver's Avatar
    Netherlands
       Netherlands
    Join Date
    Jun 2015
    Posts
    2,265

    Awards Showcase

    Thanks Thanks Given 
    551
    Thanks Thanks Received 
    835
    Thanked in
    509 Posts
    If you want some more magic: https://www.advancedrenamer.com/

    Website looks crappy, program is really nice tho. Requires some time to come up with your own requirements for renaming but can do a lot.

  5. The Following User Says Thank You to Oliver For This Useful Post:

    Eddie (21Jan17)

  6. #4
    Yep, that worked, thanks guys.

Posting Permissions

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


Like our website?

You can help us by donating to cover our costs.

Many sincere thanks!


Search

Follow us

Twitter Twitter youtube iTunes Subscribe to our Podcast