Computing.Net > Forums > Programming > Batch File Rename

Batch File Rename

Reply to Message Icon

Original Message
Name: Sevy316
Date: November 14, 2006 at 10:18:03 Pacific
Subject: Batch File Rename
OS: XP
CPU/Ram: AMD 3800+ 2 GB
Model/Manufacturer: Custom
Comment:

Trying to figure out how to write a batch file to remove the first 7 characters of an .mp3 file's name [xxxxx]testsong.mp3 to testsong.mp3 I cannot figure out how to do this successfully for a whole folder full of these songs, any help is appreciated.


_


Report Offensive Message For Removal

Response Number 1
Name: Mechanix2Go
Date: November 14, 2006 at 11:43:30 Pacific
Subject: Batch File Rename
Reply: (edit)

@echo off

for /f "tokens=* delims=" %%M in ('dir /b/a-d *.mp3') do (
set name=%%M
echo ren "%%M" "%name:~7,99%"
)


=====================================
If at first you don't succeed, you're about average.

M2



Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Batch File Rename

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software