The killer space!
- From: sand <peter@xxxxxxxxxxxxx>
- Date: Fri, 15 Feb 2008 20:54:20 -0800 (PST)
A friend created a .bat file for me so I could easily rename files I
download from a photo site. The site names each file: Picture_1.jpg
and I want to rename them to follow a date-roll-shot number:
2008-02-15-01-01.
So here's the script:
------
::BatchRename.cmd
@echo off
for /f %%i in ('dir /b') do call :rename %%i
goto :EOF
:rename
set Oldname=%1
set NewName=%oldname:Picture_=2006-08-16-03-%
rename %oldName% %newname%
goto :EOF
------
Then the photo site changed the way they named the individual files.
So instead of "Picture_1.jpg" there is now a space instead of the
underline so it reads "Picture 1.jpg".
And the script doesn't work anymore.
Could some one help me update the .bat file so it can handle the empty
space?
Thanks in advance!
Pete
.
- Follow-Ups:
- Re: The killer space!
- From: Todd Vargo
- Re: The killer space!
- Prev by Date: Re: Flashing message in an HTA
- Next by Date: Re: The killer space!
- Previous by thread: Re: Eric Lippert's latest postings...
- Next by thread: Re: The killer space!
- Index(es):
Relevant Pages
|
Loading