I'm starting to get the hang of writing VB.NET code--very simple jobs, but covering some esoteric subject matter. The first two tasks I needed to accomplish came about because I decide to import my (rather large) CD collection onto my new (also rather large) external hard drive; I used Apple’s iTunes. iTunes uses an online database to identify each CD and employs the information to create folder (i.e. album) and track (song) names. These names are truncated and/or abbreviated to fit file systems which only accommodate short file/directory names. Sometimes, the database cannot identify the album; as I have the original in hand, I can supply the missing information; unfortunately, iTunes makes no provision for this! I entered the missing info into a plain text file.
My first program asked for a target folder then inspected it for a text file called titles.txt. If found, it opened the text file and counted the number of .m4a (music) files in the folder. If the text file had the same number of titles as tracks in the folder, it renamed the tracks to match the names. Unfortunately, there are a few illegal characters where file/folder names are concerned. The program has provisions for replacing invalid characters as designated by the user. This worked great for the song titles which were missing!
My second task was a bit more daunting! The actual .m4a file contains the complete song title but the file has a truncated/abbreviated name, this is displeasing to my perfectionist eye! I wrote a second program which, when pointed at a folder, looks at every .m4a file in it and all sub-folders it contains, and reads the song name from the file then renames the file appropriately (given that the file system I use may contain very long names and replacing any invalid characters). This required two fairly difficult (for a beginner) sub-tasks—one was to recursively inspect all sub-directories the other was to parse the meta-data in an MP4 (.m4a) file.
Years ago I knew how to post code projects on my web page (different OS!) I may be able to figure out how to zip up a project and post it on my website, but what do I need to include, to make the offering useful? I have downloaded tons of code examples and not a single one would compile! Sometimes the code itself was worth reading, but I would like folks to be able to compile and run my examples. I will try zipping the project folder and sticking that on my site.