Adblock breaks this site

Need some help making a useful program.

Discussion in 'Programming General' started by Covey, Sep 18, 2009.

  1. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    Need some help making a useful program.

    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
     
  2. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
  3. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    Need some help making a useful program.

    Well, would you be able to show me an example of how to use a Folder Directory Box or something because it's fucking confusing as fuck to me. I'm used to vb6's easy to use shit.
     
  4. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    Need some help making a useful program.

    specifically tell me what you're trying to do.
     
  5. Blupig

    Blupig BEEF TOILET
    $5 USD Donor

    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant
    Need some help making a useful program.

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

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    Need some help making a useful program.

    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.

    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.
     
  7. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    Need some help making a useful program.

    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
     
  8. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    Need some help making a useful program.

    But then how do i display all the mp3's from that path into a listbox?
     
  9. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    Need some help making a useful program.

  10. Coron

    Coron Forum Addict
    Banned

    Joined:
    Aug 9, 2009
    Posts:
    287
    Referrals:
    0
    Sythe Gold:
    0
    Need some help making a useful program.

    You want to browse the files in a path, or get all the .mp3 files from a path?
     
  11. Coron

    Coron Forum Addict
    Banned

    Joined:
    Aug 9, 2009
    Posts:
    287
    Referrals:
    0
    Sythe Gold:
    0
    Need some help making a useful program.

    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.
     
  12. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    Need some help making a useful program.

    Thanks bro, but i've got all that part sorted out. I'm currently trying to disassemble a MP3 project to get the references i need to withdraw the id3 information from the mp3's.
     
  13. Coron

    Coron Forum Addict
    Banned

    Joined:
    Aug 9, 2009
    Posts:
    287
    Referrals:
    0
    Sythe Gold:
    0
    Need some help making a useful program.

    You're welcome..

    Maybe this will help.
     
  14. Harlem9191

    Harlem9191 Member

    Joined:
    Mar 10, 2009
    Posts:
    81
    Referrals:
    0
    Sythe Gold:
    0
    Need some help making a useful program.

    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 ^_^
     
< Java Frames | Free .Net Express Download >


 
 
Adblock breaks this site