Reputation: 2240
Non work related so this isn't urgent:
I found a post by Ray Camden here that will recurse a specific folder path. I want to extend this to search my computer for my music files. I know I have duplicates and if I can find the files, i can remove them.
Ultimately, i want to build a music library/catalog so that I will stop buy the same music twice (or three times in some cases - I'm embarassed to admit that but it is what it is). I've thought about writing an ms-dos script to search and output the results to a file, and then loop over the file to store the contents into a database. This does seem to be a faster process than what CF can do, not to mention the script wont run into the 'java.lang.OutOfMemoryError: Java heap space' issue.
If you know of something like that that already exists, can you post a link or give me your two cents on which way would be better? I have several drives that I've acquired over the years of new computers and there is crap on just about all of them since some of them are now my backup drives.
Upvotes: 0
Views: 112
Reputation: 2240
I ended up making ms-dos batch file to scour the drives using the following switches, dir /s /b *.mp3 *.wma *.m4a *.flac *.mp4 *.m4a *.m4v *.mp3PRO *.mp2 *.wav > music_files.txt
and then just performing a loop over the file and inserting the records into my sql database. I can do this again with my videos - I found my wedding video 6 times (LOL). I did not want to be like Ray Barone and record the super bowl over the video I guess. :)
Have a great day.
Upvotes: 0
Reputation: 936
<cfdirectory action="list" recurse="yes" directory="c:/" query="MyFiles>
<cfloop query="MyFiles">
<cfif RIGHT(MyFiles.name,4) EQ ".mp3">
<!--- DUMP DATA TO DATABASE---->
</cfif>
</cfloop>
Then use sql queries to find duplicate files.
Upvotes: 1