The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.
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:
...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?
...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!!
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.
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?
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!!
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!
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!
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!!
Posts
Beginning of some masterful organization scheme which is too long and detailed for me to care typing out
Uh-oh I accidentally deleted my signature. Uh-oh!!
It would just save me a lot of time if someone knew of a decent free one.
Uh-oh I accidentally deleted my signature. Uh-oh!!
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.
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
Uh-oh I accidentally deleted my signature. Uh-oh!!
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
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?
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!
Uh-oh I accidentally deleted my signature. Uh-oh!!
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!
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.
Uh-oh I accidentally deleted my signature. Uh-oh!!