Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it, follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.
Our rules have been updated and given their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!
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
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)
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!
<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.
Posts
Beginning of some masterful organization scheme which is too long and detailed for me to care typing out
It would just save me a lot of time if someone knew of a decent free one.
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
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!
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.