Rename problem
Posted: Fri Mar 10, 2006 7:40 am
Hi guys, i have a variable that holds a file path such as
And i have code that will check the filename, and strip out ! ' - from the filename and rename it, the trouble being that if it finds it before the actual mp3, like in a prent folder it will rename it and try to rename the folders too (which is also what i want) but then tries to write the whole path back to the server
For example
would be renamed to:
which throws up an error as it says that the folder "50 Cent ft Snoop Dogg" exists
which is what i want but, all i need renaming is as this is all thats changed.
I think i need some sort of code that will check each folder in the path seperately until it reaches the mp3 and rename it accordingly
Any ideas, not sure if i've made it very clear
Thanks alot,
Dave
Code: Select all
media\50 Cent ft Snoop Dogg\Shady Records-(Promo)\04 P.I.M.P. Remix.mp3For example
Code: Select all
media\50 Cent ft Snoop Dogg\Shady Records-(Promo)\04 P.I.M.P. Remix.mp3Code: Select all
media\50 Cent ft Snoop Dogg\Shady Records(Promo)\04 P.I.M.P. Remix.mp3which is what i want but, all i need renaming is
Code: Select all
Shady Records-(Promo)\04 P.I.M.P. Remix.mp3I think i need some sort of code that will check each folder in the path seperately until it reaches the mp3 and rename it accordingly
Any ideas, not sure if i've made it very clear
Thanks alot,
Dave