As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/

[SOLVED] So many files, so little organization...

TasteticleTasteticle Registered User regular
edited October 2009 in Help / Advice Forum
Hey guys, does anyone know of any good (free) software that will take a large group of files, and organize the files into folders based on those files names?

For example, say I have the following files on my computer:

file1.pdf
file2.pdf
file3.pdf
.
.
.
.
fileeightybillion.pdf

Is there something out there that will then create a directory for each file so it would become:

file1/
file2/
file3/
.
.
.
.
fileeightybillion/

?

I'm hoping there is so I won't have to code one myself.


Uh-oh I accidentally deleted my signature. Uh-oh!!
Tasteticle on

Posts

  • iglidanteiglidante Registered User regular
    edited October 2009
    ...why would you want to go from having a billion files, to having a billion directories with one file in each? Or is this just the beginning of some masterful organization scheme?

    iglidante on
  • TasteticleTasteticle Registered User regular
    edited October 2009
    iglidante wrote: »
    ...why would you want to go from having a billion files, to having a billion directories with one file in each? Or is this just the beginning of some masterful organization scheme?

    Beginning of some masterful organization scheme which is too long and detailed for me to care typing out

    Tasteticle on

    Uh-oh I accidentally deleted my signature. Uh-oh!!
  • iglidanteiglidante Registered User regular
    edited October 2009
    Looks like there are probably some pay apps that will do something similar.

    iglidante on
  • TasteticleTasteticle Registered User regular
    edited October 2009
    Yeah I managed to find some pay apps but really I can code this thing myself for free.

    It would just save me a lot of time if someone knew of a decent free one.

    Tasteticle on

    Uh-oh I accidentally deleted my signature. Uh-oh!!
  • iglidanteiglidante Registered User regular
    edited October 2009
    I couldn't figure out a good search string to get the results I wanted. "Create folder each file" didn't do the trick.

    If you can code it yourself, that might be the easiest way. Really, it's a simple loop: for each file, make a directory with the file name, move the file to it, next. Now, I don't code myself, so I can't talk specs, but it sounds fairly straightforward.

    iglidante on
  • TasteticleTasteticle Registered User regular
    edited October 2009
    yeah

    again, that is not my issue

    I would just not rather waste 30-60 minutes making a full fledged program to do this if someone already knew of one

    Tasteticle on

    Uh-oh I accidentally deleted my signature. Uh-oh!!
  • rfaliasrfalias Registered User regular
    edited October 2009
    VBScript, save it to a notepad, save as .vbs
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    strFolderPath = "C:\test\"
    Set objFolder = objFSO.GetFolder(strFolderPath)
    Set objColFiles = objFolder.Files
    fpLen = Len(strFolderPath)
    For Each file In objColFiles
    fn = Right(file,Len(file) - fpLen)
    fn2 = Left(fn,Len(fn) - 4)
    catDir = strFolderPath & fn2 & "\"
    objFSO.CreateFolder(catDir)
    objFSO.MoveFile file, catDir
    Next
    strFolderPath = "C:\test\"
    Change that to what ever directory you want.
    It's basic, very basic but it does the job.


    Edit: Just so I'm clear it's the right thing... This Creates a folder with the same name as what ever file is in a directory, then moves that file to the folder...
    So C:\poop.pdf is moved to C:\poop\poop.pdf
    Right?

    rfalias on
  • TasteticleTasteticle Registered User regular
    edited October 2009
    Haha you know what?

    In my infinite wisdom and after years of developing in Java, I totally forgot that I could use vbs as a totally quick and dirty way and it'll run on virtually any pc here at work without needing admin access (which was my problem)

    Thanks!

    Tasteticle on

    Uh-oh I accidentally deleted my signature. Uh-oh!!
  • rfaliasrfalias Registered User regular
    edited October 2009
    Tasteticle wrote: »
    Haha you know what?

    In my infinite wisdom and after years of developing in Java, I totally forgot that I could use vbs as a totally quick and dirty way and it'll run on virtually any pc here at work without needing admin access (which was my problem)

    Thanks!

    :)
    I'm a VBScript whore here at work, there are just so many possibilities and it's just so damn quick and easy. No need for a compiler or anything!

    <3 VBS.

    rfalias on
  • TasteticleTasteticle Registered User regular
    edited October 2009
    rfalias wrote: »
    Tasteticle wrote: »
    Haha you know what?

    In my infinite wisdom and after years of developing in Java, I totally forgot that I could use vbs as a totally quick and dirty way and it'll run on virtually any pc here at work without needing admin access (which was my problem)

    Thanks!

    :)
    I'm a VBScript whore here at work, there are just so many possibilities and it's just so damn quick and easy. No need for a compiler or anything!

    <3 VBS.

    I have not touched vb since high school (over 7 years ago) and after working for years entrenched in C++, Java, and the like I had totally forgotten about it. Problem solved.

    Tasteticle on

    Uh-oh I accidentally deleted my signature. Uh-oh!!
This discussion has been closed.