User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 402,928 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,959 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser: Programming Forums

Text printing is giving me trouble

Join Date: Jul 2005
Location: FL.
Posts: 1,536
Reputation: tayspen is on a distinguished road 
Rep Power: 7
Solved Threads: 98
Colleague
tayspen's Avatar
tayspen tayspen is offline Offline
<Insert title here>

Re: Text printing is giving me trouble

  #10  
Sep 19th, 2005
ok so i tried this is is the exact code under the rip button



private void button1_Click(object sender, EventArgs e)
        {

            try
            {
              
                string sourceDir = textBox1.Text + "\\iPod_Control\\Music";//add this to the drive that the user typed in (sets up the source file)
                string targetDir = folderBrowserDialog1.SelectedPath; //show them the browser there directory = target

                foreach (string d in Directory.GetDirectories(sourceDir))
                {


                    foreach (string f in Directory.GetFiles(d, fileType))
                    {
                       
                        label2.Visible = true;//label2 now visible upon button click

                        // Now try to read tags from the file to copy
                        ID3v1 mp3Tag = new ID3v1(f);
                        File.Copy(f, targetDir + "\\" + mp3Tag.Artist + "_" + mp3Tag.Title + new FileInfo(f).Extension, false);

                        //........
                    }
                }
            }

            catch
            {
                frmerror frm = new frmerror();
                frm.ShowDialog(this);  // show notes (EDIT: notes canceled now show about)
                frm.Dispose();
            }




        }




EDIT: just took off catch statement. the error was that the file - already exists...
now it copies one song with the file name -

and then it shows me my catch form if somthing goes wrong.....

i hadded that ID# form and everything...
Firefox
Ewido
Tune up windows
Get detailed system information
My Fixes

Member - Alliance of Security Analysis Professionals - Since 2006
Reply With Quote  
All times are GMT -4. The time now is 4:55 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC