.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old April 29th, 2004, 04:44 AM
Will's Avatar

Will Will is offline
Lieutenant Colonel
 
Join Date: Mar 2001
Location: Emeryville, CA
Posts: 1,412
Thanks: 0
Thanked 0 Times in 0 Posts
Will is on a distinguished road
Default AI Utility

At the request of Imperator Fyron, I have created a batch file script that takes all files in a directory, then creates copies of it in all subdirectories, while prefixing the file with the name of the directory and an underscore (_).

Apparently, this would be quite useful to create generic copies of AI files in several subdirectories

linky link

As I don't really have SEIV installed on my computer here, I don't know if this works perfectly. As I remember the AI files, it *should* work. Pretty much, like I said, it just takes the subdirectory (race) name, tacks it on front of the file name with an underscore, and copies the file to the subdirectory. So if you have a set of generic AI template files (sans the race name and underscore) in a directory, you can create one or two or fifty subdirectories, place this script in the directory, double click, and it should automagically do the copying/renaming for you.

I made it on a Windows 2k box, so it should work on 2k, NT, and XP. I have no idea if it will work on 9x. If someone could test it out, that would be grand. If it doesn't work, and someone else doesn't create a 9x Version by the time I get home (mid-May), I'll (hopefully) post a 9x Version then.

Free (as in speech, and as in beer) for everyone. Download, copy, distribute to your heart's content. It's only one line of code, anyway It would be appreciated if people did too, I'll probably take it down in a week or so... actually...

... since it *is* just one line of code...

code:
 
for /D %%d in (*) do @for %%f in (*.txt) do @copy %%f .\%%d\%%d_%%f

... copy that into a file, give it a .bat extension, and run to your heart's content. I'll leave the link for a while for the more lazy among us. After I take the link down, the code will still be here. Ha!

(Now Fyron, aren't you glad you didn't go about writing a C program to do this? )
__________________
GEEK CODE V.3.12: GCS/E d-- s: a-- C++ US+ P+ L++ E--- W+++ N+ !o? K- w-- !O M++ V? PS+ PE Y+ PGP t- 5++ X R !tv-- b+++ DI++ D+ G+ e+++ h !r*-- y?
SE4 CODE: A-- Se+++* GdY $?/++ Fr! C++* Css Sf Ai Au- M+ MpN S Ss- RV Pw- Fq-- Nd Rp+ G- Mm++ Bb@ Tcp- L+
Reply With Quote
 

Bookmarks


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

Forum Jump


All times are GMT -4. The time now is 05:07 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.