The UNIX and Linux Forums
>
Special Forums
>
Windows & DOS: Issues & Discussions
DOS script to grab the first file in a dir and rename it
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
DOS script to grab the first file in a dir and rename it
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
04-07-2009
raghav525
Registered User
Join Date: Mar 2009
Posts: 9
Thanks!
Thanks for the reply! i got the solution...
@echo off & setLocal EnableDelayedExpansion
cd D:\apps\Infa\param\
if exist "%1".prm del /F "%1".prm
for /f "tokens=* delims= " %%a in ('dir/b/a-d/o/n D:\apps\Infa\param\"%1_"*.prm') do (
ren %%a "%1".prm
goto :eof
)
raghav525
View Public Profile
Find all posts by raghav525
Find raghav525's past nominations received
Find raghav525's present nominations given