Subject:
|
Re: Bulk processing
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Fri, 23 Jun 2000 17:54:09 GMT
|
Viewed:
|
941 times
|
| |
![Post a public reply to this message](/news/icon-reply.gif) | |
In lugnet.cad, jake mckee wrote:
> steve,
> this --01 issue has brought up the concept of renaming files again. is there
> a batch way to rename a file based in part on what it currently is named? so
> file--01.gif is changed to file.gif
If you've already generated all the image files, you're going to have a
hard time cleaning them up correctly. If you're willing to scrap the
existing files, and regenerate all the images, you can get correct
filenames with no problem.
Jonathan mentioned:
> There is. What you do is you have these lines in your batch file.
> rename ?--01.gif ?.gif
> And so on, with more ? each time.
> That should work for you.
There are two (related) problems with that approach, in this particular
situation: 1) you don't know how many hyphens are going to appear in the
filename, and 2) sometimes, the original filename is cut off.
In the onepart.bat file, the %1 parameter contains the original filename,
XYZ.dat. You can use this to rename the image files, perhaps adding:
ren c:\ldraw\bitmap\*.* %1
ren c:\ldraw\bitmap\*.dat *.bmp
to the onepart.bat file.
The first statement will rename all files in ldraw\bitmap (there will be
only one file there) to XYZ.dat. The second command will change XYZ.dat to
XYZ.bmp.
After you've got the name fixed, you can move the file out to a different
location.
Steve
|
|
Message is in Reply To:
![](/news/x.gif) | | Re: Bulk processing
|
| steve, this --01 issue has brought up the concept of renaming files again. is there a batch way to rename a file based in part on what it currently is named? so file--01.gif is changed to file.gif thanks! jake In lugnet.cad, Steve Bliss writes: >In (...) (24 years ago, 22-Jun-00, to lugnet.cad)
|
14 Messages in This Thread: ![Bulk processing -Jake McKee (14-Jun-00 to lugnet.cad)](/news/x.gif) ![](/news/246.gif) ![Re: Bulk processing -Tim Courtney (14-Jun-00 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/268.gif) ![Re: Bulk processing -Rui Manuel Silva Martins (15-Jun-00 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/68.gif) ![Re: Bulk processing -Steve Bliss (15-Jun-00 to lugnet.cad)](/news/x.gif) ![](/news/246.gif) ![Re: Bulk processing -Rui Manuel Silva Martins (16-Jun-00 to lugnet.cad)](/news/x.gif) ![](/news/246.gif) ![Re: Bulk processing -Jonathan Wilson (16-Jun-00 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Bulk processing -Steve Bliss (19-Jun-00 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/268.gif) ![Re: Bulk processing -Jake McKee (17-Jun-00 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Bulk processing -Steve Bliss (19-Jun-00 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Bulk processing -Jake McKee (19-Jun-00 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Bulk processing -Steve Bliss (19-Jun-00 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Bulk processing -Jake McKee (22-Jun-00 to lugnet.cad)](/news/x.gif) ![](/news/246.gif) ![Re: Bulk processing -Jonathan Wilson (22-Jun-00 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![You are here](/news/here.gif)
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|