the_lord_mephy Posted May 30, 2005 Share Posted May 30, 2005 I have a lot of songs in a folder (Music) on my desktop all of which have the prefix "Dance - ". I'm trying to rename all of the files so they don't have Dance in front of them. $first = FileFindFirstFile(@DesktopDir & "\Music\*.*") Dim $real Do $next = FileFindNextFile($first) If $real = "" Then $real = $next Else $real = $real & "|" & $next EndIf Until @error = 1 ;MsgBox(0, "", $real) $songs = StringSplit($real, "|") Dim $newnames[$songs[0] + 1] For $i = 1 to $songs[0] $newnames[$i] = StringReplace($songs[$i], "Dance - ", "") Next ;For $i = 1 to $songs[0] ; MsgBox(0, "", $newnames[$i]) ; MsgBox(0, "", @DesktopDir & "\" & $songs[$i]) ; MsgBox(0, "", @DesktopDir & "\" & $newnames[$i]) ;Next For $i = 1 to $songs[0] FileMove(@DesktopDir & "\" & $songs[$i], @DesktopDir & "\" & $newnames[$i]) Next My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
the_lord_mephy Posted May 30, 2005 Author Share Posted May 30, 2005 (edited) Hmm I've been fooling around with them and I did a FileExists function and it returned 0 for all of those files, but I used FileFindFirstFile() Etc to find the files Edit~~ I'm retarded. i forgot to add Music\ after @DesktopDir. Sorry Edited May 30, 2005 by the_lord_mephy My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now