I have the following now and it shows no errors, will this code work? (I'm afraid of running it without knowing because I don't want to crash my whole computer if I messed it up)
Code:String[] oldFileNames = Directory.GetFiles(@"C:\Users\comp\Desktop\file - Copy\", "*File*.mp3"); try { foreach (string s in oldFileNames) { String newFileName = s.Replace("File", String.Empty); File.Move(s, newFileName); } } catch { }




Reply With Quote