Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
How to execute a .cfg file
Name: Stefan Perdal Date: November 21, 2003 at 01:01:42 Pacific OS: Windows NT 4.0 CPU/Ram: P3@1Ghz/128 Mb
Comment:
How do I execute a file that doesn't have the file extension .bat? I want to execute a .cfg that contains a lot of set variables.
Name: IVO Date: November 21, 2003 at 02:10:40 Pacific
Reply:
Just copy it renaming the destination file with the .bat extension and then run it. I assume, as you posted, the .cfg file contains executable batch commands and comment lines.
0
Response Number 2
Name: Stefan Perdal Date: November 21, 2003 at 03:23:59 Pacific
Reply:
It's like this. I have a main blabla.bat file with the script itself. I want that script to read all the variables from the blabla.cfg So other people easy just can change the config file. And also wan other scripts to read from the same config file aswell.
0
Response Number 3
Name: IVO Date: November 21, 2003 at 04:52:07 Pacific
Reply:
To help you, a more accurate description of the content of the config file is needed, as the way the main batch has to exploit to access the related configuration script is bound to the .cfg structure.
0
Response Number 4
Name: Stefan Perdal Date: November 21, 2003 at 07:51:12 Pacific
Reply:
Some examples... main.bat copy %1% %outdir%%1%
And the configfile.. main.cfg set outdir=c:\batman\
0
Response Number 5
Name: IVO Date: November 21, 2003 at 12:49:16 Pacific
Reply:
According to your post, the best way to accomplsh what you want under Windows NT/2K/XP is to use the following statement
For /F "tokens=*" %%A in (Main.cfg) Do %%A
That assumes Main.cfg contains executable statements only (as your Set...)
Otherwise if you want to mantain compatibility with the DOS-kernel Windows 9X/ME, you have to turn to the less cool
Copy Main.cfg MainCfg.bat Call MainCfg Del MainCfg.bat
Summary: Hi.. can anyone help me how to create a log file(in csv format) in one line of different information.. for example: 02/23/2003 14:00:00 DOS.txt 02/23/2003 14:02:55 where: 02/23/2003 14:00:00 - start...
Summary: I would like to create a batch file for a client/server environment which run if the date of the file does not match. How would the if statement be worded, is it possible?? Thanks in advance. ie: If...
Summary: Hey .. .i've been wondering is there anyway to make a .bat file to run programs on a usb?.. so that it will either ask you to input a name to run the software.. or it will give u a list to chose from....