Go Back   PCMech Forums > Windows Support > Windows Legacy Support (XP and earlier)

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 04-09-2009, 11:30 AM   #1
Member (9 bit)
 
jalbes's Avatar
 
Join Date: Jul 2000
Posts: 257
Cool Sequential renaming batch file

I'm trying to make a batch file and I'm not having any luck.

I have a template file called:
BORDER TEMPLATE.dwg

I want to copy this file and rename it 42 times to this:
LOT 1 CHELTENHAM ESTATES PLOT PLAN.dwg
LOT 2 CHELTENHAM ESTATES PLOT PLAN.dwg
...
LOT 42 CHELTENHAM ESTATES PLOT PLAN.dwg



Now, I found this code somewhere, and it looks like what I need, but when I run the bat file, only one file gets created and I get an error saying that XSET is not a recognized command. Any idea how I can rectify this?

Code:
:: SEQ.bat
:: Copies Files in Sequential Order
:: Makes 42 Copies
::
@ECHO OFF

SET NUMBER=1

:AGAIN
COPY "G:\Drawings\CHELTENHAM ESTATES\PLOT PLANS\BORDER TEMPLATE.dwg" "G:\Drawings\CHELTENHAM ESTATES\PLOT PLANS\LOT %NUMBER% CHELTENHAM ESTATES PLOT PLAN.dwg"  > NUL

XSET /MATH NUMBER=%NUMBER% + 1
IF NOT "%NUMBER%" == "42" GOTO AGAIN

:END
SET NUMBER=
jalbes is offline   Reply With Quote
Old 04-09-2009, 02:17 PM   #2
Member (9 bit)
 
jalbes's Avatar
 
Join Date: Jul 2000
Posts: 257
Talking

Problem solved.

I had to download XSET - shareware program and put the files into the same directory as the bat file.

Works like a charm!
jalbes is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 09:42 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2