| | |
How do I share projects on the web?
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2008
Posts: 27
Reputation:
Solved Threads: 2
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!
RenameSongs3.zip
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.
tag2file.zip
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.
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!
RenameSongs3.zip
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.
tag2file.zip
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.
Last edited by edgar5; Jan 18th, 2009 at 12:00 am. Reason: -ed.--add web links
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++
Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++
Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
Very great you can share them and make communities around them too at http://codeplex.com
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
•
•
Join Date: Dec 2008
Posts: 27
Reputation:
Solved Threads: 2
I had not found codeplex--looks like a good resource for both mining and posting code. Thanks!
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++
Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++
Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
and what about http://sourceforge.net/ ?
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
•
•
Join Date: Dec 2008
Posts: 27
Reputation:
Solved Threads: 2
I'm a member at Sourceforge but do not find it user friendly. For me, as a seeker of sample code, not a single one of at least 15 VB.Net project I got there would compile and run! I think the major changes in VB2008 are the culprits
!
I am working on the second project today (tag2file). It is still very rough! Am learning about Try...Catch...Finally. When last I coded (about 8 years ago) they were just showing up and I never really learned the details. Is this proper:
or do I have to catch each seperately with its own MsgBox?
!I am working on the second project today (tag2file). It is still very rough! Am learning about Try...Catch...Finally. When last I coded (about 8 years ago) they were just showing up and I never really learned the details. Is this proper:
VB.NET Syntax (Toggle Plain Text)
Try My.Computer.FileSystem.RenameFile(fileNameFull, fileNameWext.ToString()) Catch Ex As ArgumentException Catch Ex As FileNotFoundException Catch Ex As PathTooLongException Catch Ex As IOException Catch Ex As NotSupportedException Catch Ex As SecurityException Catch Ex As UnauthorizedAccessException MsgBox("Uncaught file rename error. " + Ex.GetType().Name + vbNewLine + "Did NOT rename:" + vbNewLine + fileNameFull) Finally MsgBox("Unknown uncaught file rename error. Did NOT rename:" + vbNewLine + fileNameFull) End Try
or do I have to catch each seperately with its own MsgBox?
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++
Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++
Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
•
•
Join Date: Dec 2008
Posts: 27
Reputation:
Solved Threads: 2
•
•
•
•
or do I have to catch each seperately with its own MsgBox?VB.NET Syntax (Toggle Plain Text)
Try...End Try
VB.NET Syntax (Toggle Plain Text)
Try ... Catch exp As Exception MsgBox("An error occurred while attempting to load a file. The error is:" + System.Environment.NewLine + exp.ToString() + System.Environment.NewLine) End Try
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++
Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++
Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
You've to. and don't write catch code in Finally (because finally code executed in all cases)
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
•
•
Join Date: Dec 2008
Posts: 27
Reputation:
Solved Threads: 2
•
•
•
•
or do I have to catch each seperately with its own MsgBox?VB.NET Syntax (Toggle Plain Text)
Try...End Try
VB.NET Syntax (Toggle Plain Text)
Try ... Catch exp As Exception MsgBox("An error occurred while attempting to load a file. The error is:" + System.Environment.NewLine + _ exp.ToString() + System.Environment.NewLine) End Try
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++
Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++
Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
•
•
Join Date: Dec 2008
Posts: 27
Reputation:
Solved Threads: 2
-Ed
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++
Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
MS Vista Ultimate 64-bit; Visual Studio 2008 & 2010 beta; Visual Basic; Visual C++
Asus P5E3 Deluxe w/ Intel E6850, 8 GB OCZ DDR3 PC3-12800, SAPPHIRE HD3870 GPU
Exactly and in .net 2.0 and later you can write
without need to use nested try catch
vb.net Syntax (Toggle Plain Text)
'try block catch.. catch.. catch..
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
![]() |
Similar Threads
- I need a great web designer and proffesional PHP Coder ~ 10k project (Web Development Job Offers)
- Full Time Web Developer - Boston (Web Development Job Offers)
- Are you in it for the money? (Growing an Online Community)
- When a host says "included scripts" (Networking Hardware Configuration)
- cPanel/Dual Xeon 3.06/2Gb RAM shared hosting available (Take 2) (Web Hosting Deals)
- Final Yer Projects (Networking Hardware Configuration)
- On Man, One Machine and 5 User Accounts (Windows NT / 2000 / XP)
Other Threads in the VB.NET Forum
- Previous Thread: Datagrid: New record with identity column
- Next Thread: Useful links information tips for .net newbie
| Thread Tools | Search this Thread |
.net .net2005 30minutes 2005 2008 access account arithmetic array basic binary bing button buttons center check code combobox component connectionstring crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dropdownlist excel file-dialog folder ftp generatetags google gridview hardcopy image images insert intel internet listview login mobile monitor ms net networking opacity output passingparameters peertopeervideostreaming picturebox picturebox1 plugin port print problem problemwithinstallation project reports" save savedialog searchbox searchvb.net select serial soap sql string table tcp text textbox timer toolbox trim update updown upload user usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf






