English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hello,

I need to rename many jpegs by adding an "l" to the end of the file name. Someone suggested putting the following in a batch file, however, it does not seem to work. I was hoping someone can help me.

for /f "tokens=1" %%a in ('dir /ad /b') do @if exist %%a\*.jpg ren %%a\*l.jpg

Thanks,


Joel

2007-01-11 01:22:35 · 2 answers · asked by liquidjoel 2 in Computers & Internet Programming & Design

2 answers

You can put this in a Batch file

@echo off
for /f "tokens=1 delims=." %%a in ('dir /b *.jpg') do rename %%a.jpg %%al.jpg

or type this at a command prompt

for /f "tokens=1 delims=." %a in ('dir /b *.jpg') do rename %a.jpg %al.jpg

2007-01-11 09:15:18 · answer #1 · answered by Kookiemon 6 · 0 0

Hey Use this ...

ren *.jpg *i.jpg

NOTE : Your File names should have only one ( . )

2007-01-11 01:41:31 · answer #2 · answered by Somnath M 2 · 0 0

fedest.com, questions and answers