Search found 4 matches

by duke
17 Jul 2008 10:36
Forum: DOS Batch Forum
Topic: String variable substitution
Replies: 7
Views: 13520

Mr greenfinch you are a star!!
I am greatly in your debt!!
That works perfectly!

could you please explain what the
setlocal ENABLEDELAYEDEXPANSION
and the ! ! marks do.i have not come across this before

once again your help is greatly appreciated
by duke
17 Jul 2008 10:09
Forum: DOS Batch Forum
Topic: String variable substitution
Replies: 7
Views: 13520

it should take list of args as many as required for example 15 make a string talking all the args (set output=%*) make a string taking the first 7 args (set nextcommand=%1 %2 %3 %4 %5 %6 %7) remove the first 7 arguments from the full set of arguments (set refoutput=%output:%nextcommand=%) output the...
by duke
17 Jul 2008 08:56
Forum: DOS Batch Forum
Topic: String variable substitution
Replies: 7
Views: 13520

Hi Greenfinch, I have tried something similar Rather than take a substring of %* i tried to build my string using a shift and label to make a loop, but unfortunatly its doesnt work correctly. I seem to face a different problem I loop through the args adding the argument i require to a string but i a...
by duke
17 Jul 2008 04:33
Forum: DOS Batch Forum
Topic: String variable substitution
Replies: 7
Views: 13520

String variable substitution

Hi, I hope someone can help I am trying to use the Environment variable substitution method %PATH:str1=% this will take the string in the path variable search for "str1" and remove it. what i need to do is remove a specific string stored in the variable in my example as nextcommand. i have...