Originally posted by: djheater
A for route is more complicated than I believe you need.
Try
REN *(E).jpg *.jpg
Tell me if it works.
Originally posted by: edro13
@echo off
cd C:\test
for %(E) in (*.zip) ren %
any help? I have no idea what I am doing...
Originally posted by: johnjbruin
Originally posted by: djheater
A for route is more complicated than I believe you need.
Try
REN *(E).jpg *.jpg
Tell me if it works.
i am guessing that wont work in windows
linux - yes
Originally posted by: johnjbruin
Originally posted by: djheater
A for route is more complicated than I believe you need.
Try
REN *(E).jpg *.jpg
Tell me if it works.
i am guessing that wont work in windows
linux - yes
Originally posted by: djheater
The trouble with the for is that iterating tokens is not done for filenames, just content??
Originally posted by: Jzero
Originally posted by: djheater
The trouble with the for is that iterating tokens is not done for filenames, just content??
For is the Leatherman Tool of DOS commands.
Give it a path and it will work the filenames in that path.
Give it a file and it will work the lines in the file.
It does some other funky stuff, too.
Originally posted by: djheater
Originally posted by: Jzero
Originally posted by: djheater
The trouble with the for is that iterating tokens is not done for filenames, just content??
For is the Leatherman Tool of DOS commands.
Give it a path and it will work the filenames in that path.
Give it a file and it will work the lines in the file.
It does some other funky stuff, too.
Hmmmm... something like
FOR /f "tokens=1,2 delims=()" %%s in ('DIR /b C:\TEMP*.jpg') do ("REN %%S(E)%%T %%S%%T")
????
Originally posted by: Jzero
Originally posted by: djheater
Originally posted by: Jzero
Originally posted by: djheater
The trouble with the for is that iterating tokens is not done for filenames, just content??
For is the Leatherman Tool of DOS commands.
Give it a path and it will work the filenames in that path.
Give it a file and it will work the lines in the file.
It does some other funky stuff, too.
Hmmmm... something like
FOR /f "tokens=1,2 delims=()" %%s in ('DIR /b C:\TEMP*.jpg') do ("REN %%S(E)%%T %%S%%T")
????
That may work with some tweaking. You could also do it like:
FOR /F ... IN ('C:\TEMP') ...
Provided that you want to change every file in C:\TEMP
Originally posted by: djheater
Originally posted by: Jzero
Originally posted by: djheater
Originally posted by: Jzero
Originally posted by: djheater
The trouble with the for is that iterating tokens is not done for filenames, just content??
For is the Leatherman Tool of DOS commands.
Give it a path and it will work the filenames in that path.
Give it a file and it will work the lines in the file.
It does some other funky stuff, too.
Hmmmm... something like
FOR /f "tokens=1,2 delims=()" %%s in ('DIR /b C:\TEMP*.jpg') do ("REN %%S(E)%%T %%S%%T")
????
That may work with some tweaking. You could also do it like:
FOR /F ... IN ('C:\TEMP') ...
Provided that you want to change every file in C:\TEMP
Yeh,
The closest I could get was:
C:\Documents and Settings\dheater>FOR /f "tokens=1,3 delims=()" %s in ('DIR /b C
:\TEMP\testcmd\*.jpg') do ('REN %s(E)%t %s%t')
But the problem is the end pren in the REN statement. It keeps causing the do to bork out because it perceives it as the end of the statement....
bleh... there's probably a clever way to nest it....
Originally posted by: tkdkid
This worked for me in win2k:
ren image???(e).jpg image???.jpg
Originally posted by: djheater
Originally posted by: tkdkid
This worked for me in win2k:
ren image???(e).jpg image???.jpg
HA!
I knew there had to be a simpler way.... I forgot all about the ? character... You sir are teh winnar