• Log in or sign up for an account here: https://www.sythe.org/login

Need some help making a useful program.

Covey

Creator of EliteSwitch

Retired Sectional Moderator
Visual Basic Programmers
Joined
Sep 9, 2005
Sythe Gold
9
Messages
4,510
Age
17
Location
Fuckin' BAM!
I'm trying to make a program that will allow you to browse through your folders (music folders) then when you find one you need to edit. You will double click on it, then all the .mp3 files in that folder will be displayed in a listbox.

Once that is done you will click a button that will say "Rename" and it will rename the mp3 files using the ID Tags in the format of [TRACKNUMBER] - [TRACKTITLE].mp3.

I should be able to tackle the mp3 id tags code by browsing google it's the searching folders code i can't seem to customize to my liking. So could someone please help me out with the searching code?

so far i have this but it just displays all my mp3's in a listbox, instead of me selecting the folders and shit.

Code:
    For Each foundfile As String In My.Computer.FileSystem.GetFiles("C:\Users\Covey\Music", FileIO.SearchOption.SearchAllSubDirectories, "*.mp3")
            ListBox1.Items.Add(foundfile)
        Next
 
Member of the Month Winner
Sythe's 10th Anniversary
Member of the Month Winner
Sythe's 10th Anniversary
specifically tell me what you're trying to do.
 
Valentine's Singing Competition Winner
Sythe Awards 2015 Winner
Sythe Awards 2016 Winner
Sythe Awards 2020 Winner
Member of the Month Winner
MushyMuncher
Gohan has AIDS
Extreme Homosex
World War 3
I'm LAAAAAAAME
Discord Verified
Off Topic Participant
VB.net is far easier than VB6...If you're looking at the folder browse dialog, just google its properties.
 
specifically tell me what you're trying to do.

Ok, my aim is to rename all my mp3 files to their correct name, (because i have downloaded them) 90% have extremely shit names like "02_hilltop_hoods_state_of_the_art_2008_chase_that_feeling.mp3" where i would like to change it's name to "02 - Chast That Feeling.mp3" Using the MP3 ID Tags to get the song track and title.

But i would like to be able to select the folders to apply the renaming to it.

Does that makes sense? If not let me know.

VB.net is far easier than VB6...If you're looking at the folder browse dialog, just google its properties.

I fully accept the fact that .net is far easier/faster/superier to vb6. It's just that i'm extremely shit at it and impatient :)
I'm not the type of person who learns from following tutorials, i learn things alot faster by dismantling source codes and finding out how it works that way.
 
Member of the Month Winner
Sythe's 10th Anniversary
http://msdn.microsoft.com/en-au/library/system.windows.forms.folderbrowserdialog.aspx

That ought to be of some help to you.

Just in case you don't understand, when you open the FolderBrowserDialog, the path information for when you press "OK" is set to FolderBrowserDialog.SelectedPath.

So, for example:
Code:
Dim Path As String
Dim result As DialogResult = fb.ShowDialog()
If(result = DialogResult.OK)
    Path = fb.SelectedPath
End If
 
http://msdn.microsoft.com/en-au/library/system.windows.forms.folderbrowserdialog.aspx

That ought to be of some help to you.

Just in case you don't understand, when you open the FolderBrowserDialog, the path information for when you press "OK" is set to FolderBrowserDialog.SelectedPath.

So, for example:
Code:
Dim Path As String
Dim result As DialogResult = fb.ShowDialog()
If(result = DialogResult.OK)
    Path = fb.SelectedPath
End If

But then how do i display all the mp3's from that path into a listbox?
 
Code:
        Dim di As New IO.DirectoryInfo("C:\")
        Dim aryFi As IO.FileInfo() = di.GetFiles("*.mp3")
        Dim fi As IO.FileInfo

        For Each fi In aryFi
            ListBox1.Items.Add(fi.FullName)
        Next

This piece of code will search through the path C:\ (Does not support sub-directories)

It will search for .mp3 files, and add the full path for each item to ListBox1. ;)

If you want to rename the file - try this.
Code:
My.Computer.FileSystem.RenameFile(fi.FullName, "name")

Haven't tried it though - and you'll need administrator access.
 
If you're still attempting to do this (i'm guessing you aren't). You could use steamreader to read the mp3 file and do what you did above to display all the mp3 names in a listbox. You could then search for specific characters in the string, use 'split' to split up the string and 'remove' or 'removeat' to remove the specified character. Then use steamwriter to write the mp3 files to a different folder. If you're satisfied then delete all your other songs.

Just a thought ^_^
 
Runescape Gamblingrunescape gambling
Back
Top