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
    Join Date
    Mar 2012

    Awards Showcase

    Thanks Thanks Given 
    Thanks Thanks Received 
    Thanked in
    2,605 Posts
    Powershell script.
    Edit the first line to have your source folder.

    $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


    76th vFS Squadron Command
    Oliver's Avatar
    Join Date
    Jun 2015

    Awards Showcase

    Thanks Thanks Given 
    Thanks Thanks Received 
    Thanked in
    563 Posts
    If you want some more magic:

    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.

    A mission’s execution often reflects the quality, discipline, and tone set in the briefing.
    - Chris “Kimos” Haave

  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!


Follow us

Twitter Twitter youtube iTunes Subscribe to our Podcast