1.

Solve : i want to make a file name changer.?

Answer»

I have a lots of music, and lots of them have an underscore in lots of places eg.
blabla_bla_-_blabla.mp3 i WANT to replace all underscores with spaces instead.

I also have a few game folders i with CD in the name that i want to remove eg.
CD Blabla i want to remove the CD in the name of the folder.


Thank you. =)QUOTE

I have a lots of music, and lots of them have an underscore in lots of places eg.
blabla_bla_-_blabla.mp3 i want to replace all underscores with spaces instead.

If you can read the hieroglyphics on the wall, you are WELCOME to try this. Note: This was literally tested with blabla_bla_-_blabla.mp3.

Code: [Select]@echo off
setlocal enabledelayedexpansion

for %%V in (C:\temp\*.mp3) do (
set newname=%%~nxV
set newname=!newname:_= !
ren "%%V" "!newname!"
)

Be sure to point to your directory.

Quote
I also have a few game folders i with CD in the name that i want to remove eg.
CD Blabla i want to remove the CD in the name of the folder.

This can be accomplished by tweaking the posted code. If it's only a few game folders, doing it manually might be faster than writing code.

Good luck. Quote from: Sidewinder on August 12, 2008, 05:18:46 AM
Quote
I have a lots of music, and lots of them have an underscore in lots of places eg.
blabla_bla_-_blabla.mp3 i want to replace all underscores with spaces instead.

If you can read the hieroglyphics on the wall, you are welcome to try this. Note: This was literally tested with blabla_bla_-_blabla.mp3.

Code: [Select]@echo off
setlocal enabledelayedexpansion

for %%V in (c:\temp\*.mp3) do (
set newname=%%~nxV
set newname=!newname:_= !
ren "%%V" "!newname!"
)

Be sure to point to your directory.

Quote
I also have a few game folders i with CD in the name that i want to remove eg.
CD Blabla i want to remove the CD in the name of the folder.

This can be accomplished by tweaking the posted code. If it's only a few game folders, doing it manually might be faster than writing code.

Good luck.


Thank you very much, it helped but it doesn't make it in underfolders. :/
its above 300gig games
so its quite a few dunno if this will work (i dont test it)

change this

Code: [Select]for %%V in (c:\temp\*.mp3) do (to
Code: [Select]for /F %%V in ('dir /b /s *.mp3') do (
ofc YOR file must be in right folder


Discussion

No Comment Found