Subject:
|
Re: Bulk processing
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Fri, 23 Jun 2000 17:54:09 GMT
|
Viewed:
|
1061 times
|
| |
| |
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:
| | 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:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|