SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 08-05-09, 07:25 PM   #1
Doolittle81
Commodore
 
Join Date: Oct 2007
Location: Las Vegas, Nevada
Posts: 624
Downloads: 6
Uploads: 0
Default Request help with writing batch program

Could someone help me with writing a batch program. I need a batch program that will randomly select (and rename?) a file from a folder of files so that the generic file will be replaced and the newly selected file will run in its stead. Okay..confusing, it sounds. For example, in Silent Hunter, the Girl in Every Port MOD is a program (Batch?) which can be run which selects a JPG file from a folder of several hundred variously name files, apprently renames the selected file to the required default file name recognized by the game 'code', and the selected JPG Picture appears in-Game. If anyone understands what I am looking for, and could write such a program using some sort of "Demo-Filler" folder and file names, I could possibly adapt the folder/file names to my needs. (If I can find out how to open and read/rewrite such a batch.exe or *.Bat file/program)

Any help or tutorial guidance will be greatly appreciated.
__________________
Flight Sim Movies
..............................................
.........................View "Faith, Hope, and Charity" movie
Doolittle81 is offline   Reply With Quote
Old 08-06-09, 02:51 PM   #2
Pisces
Silent Hunter
 
Join Date: Dec 2004
Location: AN9771
Posts: 4,904
Downloads: 304
Uploads: 0
Default

As far as my DOS memory spans backwards (so no 640k barrier involved ) batchfiles don't have the ability to generate random values/variables. Such a function (special selection of a file) would usually be done bu writing a small console application that returns the filename.

Perhaps you can perform your desired function with the more modern Windows scripting languages VBscript or Jscript (can't help here unfortuneatly):

http://msdn.microsoft.com/en-us/library/ms950396.aspx
__________________
My site downloads: https://ricojansen.nl/downloads
Pisces is offline   Reply With Quote
Old 08-14-09, 11:57 PM   #3
Doolittle81
Commodore
 
Join Date: Oct 2007
Location: Las Vegas, Nevada
Posts: 624
Downloads: 6
Uploads: 0
Default

Still looking for help...anyone seen Digital Trucker on the Forum lately????
__________________
Flight Sim Movies
..............................................
.........................View "Faith, Hope, and Charity" movie
Doolittle81 is offline   Reply With Quote
Old 08-16-09, 01:33 AM   #4
Doolittle81
Commodore
 
Join Date: Oct 2007
Location: Las Vegas, Nevada
Posts: 624
Downloads: 6
Uploads: 0
Default

Sorry....Another Bump... I really need this help!
__________________
Flight Sim Movies
..............................................
.........................View "Faith, Hope, and Charity" movie
Doolittle81 is offline   Reply With Quote
Old 08-16-09, 05:15 PM   #5
Munchausen
Commodore
 
Join Date: Jul 2002
Posts: 608
Downloads: 25
Uploads: 1
Default

Do a Google search for "Batch Files" or "DOS Commands" ... you should find one or two good tutorials. Depending on your OS, you might also need to download and install a "recent" version of DOS from Microsoft.
Munchausen is offline   Reply With Quote
Old 08-16-09, 10:00 PM   #6
Doolittle81
Commodore
 
Join Date: Oct 2007
Location: Las Vegas, Nevada
Posts: 624
Downloads: 6
Uploads: 0
Default

Thanks. I might be making some progress...
__________________
Flight Sim Movies
..............................................
.........................View "Faith, Hope, and Charity" movie
Doolittle81 is offline   Reply With Quote
Old 08-17-09, 01:59 PM   #7
Munchausen
Commodore
 
Join Date: Jul 2002
Posts: 608
Downloads: 25
Uploads: 1
Default

This might help: typing "edit" (without the quotes) into the Start -> Run window will open a blank DOS page ... use the menu bar at the top of the page same as for a standard Windows program.
Munchausen is offline   Reply With Quote
Reply


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 Off

Forum Jump


All times are GMT -5. The time now is 02:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.