File organizer

Anything not directly related to the UOAI library or its managed wrapper, UOAI.NET, belongs in this forum.

File organizer

Postby megamandos on Sun Jan 17, 2010 9:41 am

I got tired of having to place my downloaded mp3's and avi's and such in their respective folders and having to sort through my usenet download folder to find everything i wanted so I sat down for about half an hour and made this nifty app. It allows you to choose file extensions (fe. mp3, avi, wmv or mp4) and a source and target directory. You hit the start button and it does a recursive search of the source directory and finds all the files and places them all in one big folder. I have made the file type select box a combo box, so you can choose a preselected group of file types (fe. video, audio, or image) and customize that as necessary. I will be posting it later as soon as I am done.

EDIT: Ok, so massive changes from the original idea. Now its not just files types, you can use it to search for phrases in files and even use the asterisk (*) wild card, separate search terms with a semicolon (;). for example:

You want to move all the files from your documents folder with the word "porn" in their name and also all files that are ".avi" then simply type in the following string into the "Search terms":

*.avi;*porn*


Also it check to make sure you aren't an idiot and try to move shit from your program files or entire C:\ drive (or w/e drive your copy of windows is on) or windows directory. It also checks for "Program Files (x86)" for those 64 bit users (myself included). It won't stop you, but it will ask you if you are sure that you want to do it and warn that its generally a bad idea.

It also comes with a pretty vast array of pre-programmed file extensions for video/audio/images. Also, it took me 2 hours, instead of half an hour; although I am more content with the results. Now only to find an Icon for the exe and post it.

There, done... Uploaded the documented source AND the compiled product. Named it KFO, for "Kontrast's File Organizer" ENJOY!

EDIT2: I forgot to mention, it also will make a log of all the files you moved in the target folder in case you need to move some back to their original folder you will now know where they came from.

EDIT3: Took down the files i posted because i forgot to remove a safety check when i was programming before i released it. so the copy of it that i posted before was useless. please wait while i make some changes.

EDIT4: Reposted proper files, with the new ability to drag and drop a log file onto KFO.exe to undo the changes in that log file, to undo select changes, simply delete everything in the log file except the parts you want to undo.

For real, this time it works. I tested it on my pictures folder with over 4000 files scattered in different folder within it. It took only about a second to move them all to a folder in my desktop and about the same time to move them all back to their origional folders after i dropped the "KFO Log.txt" onto the KFO.exe. I will be adding an installer with the next update, it will make it so you just have to double click the log file and it will offer to open it or to reverse the changes in it. So basically its just like the DOS command with some improvements.

EDIT5: Ok, added the installer. If you use the installer it will add the file association for ".kfol" for KFO log files. Also when you right click on a KFO Log file you will be given the following options:

"Open" - opens the file using notepad.
"Reverse" - allows you to undo the changes made that are recorded in that log file.
"Repeat" - Say you need to organize again using those same settings, clicking this will open KFO with the same settings you used when that log file was made.

Also, last but not least, I added the option to "Make No Changes" which basicaly searches and simulates moving the files, but just logs them in a KFO Log and opens it in notepad when finished. If you want to actually make those changes at a later date juck right click on the log file and click "Repeat".

EDIT6: The previous version did not deal well with duplicate file names. Though this one will just let you know it happened then continue. I plane to have it offer to rename duplicate files automatically, in the next release.

If you have any questions, don't be afraid to post.

EDIT7: Removed the files, its now downloadable here
"Those who sacrifice liberty for security, deserve neither." Benjamin Franklin
User avatar
megamandos
Guru
 
Posts: 312
Joined: Thu Jan 29, 2009 5:01 am

Re: File organizer

Postby Artaxerxes on Sun Jan 17, 2010 10:56 am

Sounds great.

Actually I always have similar problems, organizing files is just annoying, there's never a 'correct' directory structure that keeps everything nice and clean and easy to find. That's why i've thought many times about switching to a completely different approach: an object oriented database! I mean, eventually, a file system is just a crappy database system; we create files with a certain extension that signifies the 'type of file'; we create relations by some kind of descriptive directory structure... a database-system can do a much better job. I would love to get rid of the concept of "files" completely: for me an mp3 is just an mp3-'object' from the mp3-class that inherits from a general music or audio class and therefore can be .play()'d. This mp3 object once it arrives somehow on my computer should be automatically added to the database that represents my disk; which means it will also be automatically key'd by Artist, Title, Album, .... And if you also start using relations; then it can get even better: a project would be a project object; a contact a person object; now a person involved in a project has a relationship stored with this project; therefore i can find all projects with a certain person involved in a well written relational database system. I don't see why we still need files if everything can be stored in a real databasesystem.
Artaxerxes
Site Admin
 
Posts: 530
Joined: Tue Nov 18, 2008 9:51 pm

Re: File organizer

Postby megamandos on Sun Jan 17, 2010 11:43 am

Artaxerxes wrote:... me an mp3 is just an mp3-'object' from the mp3-class that inherits from a general music or audio class and therefore can be .play()'d....


You have been programming too much ahahaha.
"Those who sacrifice liberty for security, deserve neither." Benjamin Franklin
User avatar
megamandos
Guru
 
Posts: 312
Joined: Thu Jan 29, 2009 5:01 am


Return to Off Topic

Who is online

Users browsing this forum: No registered users and 1 guest

cron