Search found 11 matches

by grahaml
21 Mar 2012 01:53
Forum: DOS Batch Forum
Topic: Read a file in DOS script
Replies: 19
Views: 25647

Re: Read a file in DOS script

Thanks! :D
by grahaml
20 Mar 2012 10:38
Forum: DOS Batch Forum
Topic: Read a file in DOS script
Replies: 19
Views: 25647

Re: Read a file in DOS script

hi I'm trying to learn how to use the for loop so I can develop the suggested solution I have this in my batch file @echo off FOR /F "skip=1 tokens=1,2,3* delims==" %%i in (qt.conf) do @echo %%i %%j %%k Now I want to store the tokens in local variables but don't seem to be able to figure t...
by grahaml
20 Mar 2012 09:32
Forum: DOS Batch Forum
Topic: Read a file in DOS script
Replies: 19
Views: 25647

Re: Read a file in DOS script

yes
I can make it work as well
Could you please explain the syntax of

Code: Select all

for /f "skip=1 tokens=1,* delims== " %%a in (qt.conf) do (
for /f "delims=" %%c in ("%%~b") do set path=%path%;%%~c\\lib


Thanks for your patience
by grahaml
20 Mar 2012 09:14
Forum: DOS Batch Forum
Topic: Read a file in DOS script
Replies: 19
Views: 25647

Re: Read a file in DOS script

hi
when i run this script I get
\Common was unexpected at this time?

any ideas?
by grahaml
20 Mar 2012 08:20
Forum: DOS Batch Forum
Topic: Read a file in DOS script
Replies: 19
Views: 25647

Re: Read a file in DOS script

Hi I'm an experienced software engineer and have been backed into a corner where I need to write a batch script! The brief is to read a configuration file that has the following contents [Paths] prefix = "C:\\Program Files (x86)\\CompanyName\\Ex" What I need to do is read this file and ext...
by grahaml
20 Mar 2012 08:00
Forum: DOS Batch Forum
Topic: Read a file in DOS script
Replies: 19
Views: 25647

Re: Read a file in DOS script

Thanks
What does /f "delims" mean?
by grahaml
20 Mar 2012 07:49
Forum: DOS Batch Forum
Topic: Read a file in DOS script
Replies: 19
Views: 25647

Re: Read a file in DOS script

Thanks for that
would you mind explaining what the script is doing?
I am very new to dos programming!
by grahaml
20 Mar 2012 07:31
Forum: DOS Batch Forum
Topic: Read a file in DOS script
Replies: 19
Views: 25647

Re: Read a file in DOS script

Hi
There are 2 lines in the file
One contains a value that I want to use to set an environment variable
by grahaml
20 Mar 2012 06:23
Forum: DOS Batch Forum
Topic: Read a file in DOS script
Replies: 19
Views: 25647

Read a file in DOS script

Hi
Could someone please tell me the best way to read a text file in a DOS script.
I need to store each line in a variable that I can use in my script

Thanks in advance
by grahaml
16 Mar 2012 01:55
Forum: DOS Batch Forum
Topic: appending to the path variable
Replies: 2
Views: 3246

Re: appending to the path variable

Thanks
I'll give it a try
by grahaml
15 Mar 2012 10:47
Forum: DOS Batch Forum
Topic: appending to the path variable
Replies: 2
Views: 3246

appending to the path variable

Hello
I have never done any dos programming before, but need a script that will append (permanently) a value to the path variable; in addition the script should only add the value if it is not already in the path variable.
Any help, pointers etc would be apprecitaed