PDA

View Full Version : File moving tool (a few more features)


OdeeanRDeathshead
26th August 2007, 02:55 PM
This is a tool I have been waiting for someone to write for ages. I got sick of waiting so I knocked it up myself.

It searches an input directory and any subdirectories allowed to find files. It filters the results based on parameters you give then makes a new copy in an output directory. The new copy is named using a elaborate set of rules you can decide on and then checked to be sure it is copied correctly. A log file is produced and it is pretty easy to use.

I have tens of thousands of files (images and video) that have rubbish names. For example a lot of sites I am at I often save images but those images have been given hashed names by the site software to keep each file unique. After a few years of saving like this into different folders names tend to get get duplicated of loose any meaning. I use this tool to bring order to that mess.

Its also good for when you want to strip out a string from a group of file names or rename files according to what folder they are in. For example if I dump my camera shots into a folder for that day, this tool can rename all the images to include that name eg c:\Birthday\some_photo.jpg could end up c:\output_folder\Birthday_1.jpg.
http://www.odeean.com/ORDsite05/Images/ord_file_tool_002.gif

download the rar http://www.odeean.com/ORDsite05/Images/THfileMoveTool.gif (www.odeean.com/ORDsite05/Downloads/ORD_FileMovingTool.rar) then just extract. The program will make a registry entry under HKLM "SOFTWARE\\ORD_renamingTool". It needs this to save any settings you choose and to keep track of an index it uses to keep each name unique.

**Update**
*There is now the option to output to subfolders that are 4.2Gb max. This makes it better for creating backups. If you have 100Gb then just point it at the source and go. The output will be split into many subfolders and the subfolders put in the log.

*A bug was fixed in the file copy code.

*The output can now be organized by date of last modification, so that the names 000,001,002 etc correspond to the order the files were last written to.

*The log now has a bit more info and is organizes better.

***update***
The option to skip duplicate files has been added. The files are compared by their 32 bit crc and if found to be identical only 1 copy is made. The name of the file is not looked at, so the same file with different names will not be duplicate.

****update*****
The issues with 2Gb+ files causing problems have been fixed. It now works properly up to the 4294967294 bytes for an individual file (try to avoid this however because it is slow due to the 3 steps - copy, crc in, crc out).

*****update*****
I forgot to remove a dialog from the last version that was for testing, so thats fixed. I also fixed a bug with the checking of directory names, so now the input and output directory can both be under the same parent directory.

I also fixed a bug where 0 byte files were seen as bad. I wanted to keep 0 byte files during my backups because I sometimes use just the file name to store some password or other in I want seen in a folder.

******update******
-I added the ability to not copy the files but still produce a log.
-The option to only use the unique index if it is needed to resolve a naming conflict. This means that now your file names can be left intact as long as they are all different.
-A choice to remove a number of characters from the beginning or end of the file name.
-An option to save the hard drive from overheating when in use for long periods. It will rest for 5 minutes out of every 15 (needed if you are going to leave it on overnight to move heaps of stuff).

vijay555
27th August 2007, 02:23 AM
Odeean, good to see you. Haven't seen you around for a while.
App looks great! Comfortingly complex :)

V

OdeeanRDeathshead
27th August 2007, 06:12 AM
Thanks VJ.

I have been working on a job ($$) for a while, then when that wrapped up I had some isp issues. I mainly use three for my connection but they can't get my bill correct. Every time I increase the plan they just add a new part to my bill instead of replacing the old plan. After dozens of calls I figured the only way to sort it out was to cancel everything then start again. My fingers are still crossed.

I know the interface is a little complex but it pays off. I have been typing in hundreds of file names to catalog my back ups. I do not trust backup software because of bad experience, so I do it manually. This can get most of the work done. Its not so efficient at large files because of the size of the buffer I use to move the data but it gets the job done.

OdeeanRDeathshead
12th October 2007, 08:51 AM
Updated, makes it easier for backups. See top.

aas200
13th October 2007, 08:24 AM
This is a great tool

I've been looking for such one, but can this tools look if the same file is exist twice and only copy it once? i.e. crc32 check

Can I ask you please, to make a box to search for files in the input folder that has the same CRC32, or is there one already?

thanks for sharing

OdeeanRDeathshead
13th October 2007, 04:29 PM
Thats a good idea. I have updated the program with that option. It was an easy thing to check the file then delete it if it was a duplicate. It would have involved a more major change to check before the copy actually takes place (just the way my code was organized). This means that it will be a bit inefficient because duplicates will still be copied but removed right away.

No log entry will be made for the duplicate that was removed and the numbering of the remaining files will not be damaged.

I am not sure what you want for the second question? Do you want it to generate a crc for input files to tell you if one is found matching a known crc? I could add a crc filter in, but most people do not know the crc of the file they are looking for any way (unless they have previously seen it through winzip or winrar for example).

*edit*
There is a bug with copying files greater than the max size of an int. I will update when I have found it.

aas200
14th October 2007, 06:18 AM
I mean just to search duplictaed files in a folder or hard drive.
then box will do only search, to be faster, like this
look if the files has the same size if yes look if it has the same crc32 if yes show a list of the duplicated files.

I download a lot of files from the net, a lot I downloded them twice or more and I have no much more space in my hard drives to copy them to output folder before DVD backup, so I need to delete the duplicated files, then copy them to other output folder

OdeeanRDeathshead
14th October 2007, 06:32 AM
You can achive the same results with the app as it is now. Just set it to search where your files are and delete them when copied. You will end up with a folder containing no duplicates, and because it deletes each file as it is copied you will not need any more space larger than the size of the biggest file. (dont) do this if they are 2.1+gb because of the bug mentioned above.

OdeeanRDeathshead
14th October 2007, 04:40 PM
I have fixed the bug with large files and added some more status so it is clear the program is still working while doing long tasks. I tested it with a 2.5Gb file and it now copies correctly.

This version corrects a bug that in the previous version leads to explorer crashing when really big files are done. A side effect is that it should also be a bit faster now. The 4Gb size limit is still there.

OdeeanRDeathshead
25th October 2007, 08:00 AM
added a few more things. see top of page.