Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFEXECUTE -> Arguments

Status
Not open for further replies.

Bramvg

IS-IT--Management
Joined
Jan 16, 2001
Messages
135
Location
BE
Hi,

I have a exe file which expects a string of arguments.
I tried to use following code:

<CFEXECUTE NAME=&quot;.exe&quot; ARGUMENTS=&quot;12;123;&quot; TIMEOUT=&quot;10&quot;></CFEXECUTE>
The arguments are seperated by ';'

BUT this doesn't work. The only way it works is when I create a .bat file where I specify the whole 'shit'.
E.g.:

d:
cd d:\inetpub\ ALG;1;1;650;KOD;250;1250000;106;750000;355;100000;400;500000

Everytime someone fills out the form I create such a .bat file (cffile) to determine the arguments and next I run the .bat file using the CFEXECUTE tag to process the .bat file.
But that takes way to much time and is too slow.

Any suggestions?

Tnx
Bram
 
Nope,

There are more than 13 items, and that is very variable.
So, the length of the list is not recursive, it can be something different every time.

And all of them are dynamic., only the words ALG and KOD are vast items, all the other are variable.
Including the number of items can be different each time.

bram
 
I've discovered why passing the attributes through CFEXECUTE won't work. Is there anyway to change the deliminator the exe file accepts from &quot;;&quot; to something like &quot;_&quot; ? - tleish
 
Wow,

Thanks already in advance!

Uhm, I will have to ask the programmer is that is possible.
Let's say it's possible, what is the sollution?

Can I directly use the CFEXECUTE tag?

With kind regards
Bram
 
Possibly, I'd still suggest using the bat file, otherwise you won't have any control over where the bat file is written. The alternative to this would be to have the programer include a parameter you can pass of where to write this file.

But, you will be able to pass the parameters to the bat file. The problem with the &quot;;&quot; is that the bat file see's it a a list of separate values instead of one string. So if you pass &quot;ALG;0;1;650;KOD;250;1250000;106;750000;355;100000;400;500000&quot; to the bat file you'd get the following.

BAT
echo %1

OUTPUTS
ALG

BAT
echo %1 - %2 - %3 - %4

OUTPUTS
ALG - 0 - 1 - 650

It sees the whole list as separate values.

- tleish
 
Hello Tleish,

I asked the programmer and he changed the ';' into '_', what do I have to do now in order to make it work?


Regards
Bram
 
Try this now:

[COLOR=666666]<!--- PB2002E.bat --->[/color]

d:
cd D:\standaard-nieuwsbrief.be\ %1





[COLOR=666666]<!--- sumbit.cfm --->[/color]

<CFSET stringinfo = &quot;ALG_1_1_650_KOD_250_1250000_106_750000_355_100000_400_500000&quot;>

<CFLOCK TIMEOUT=&quot;15&quot; THROWONTIMEOUT=&quot;No&quot; NAME=&quot;Test&quot; TYPE=&quot;EXCLUSIVE&quot;>

<CFEXECUTE
NAME=&quot;#expandpath(&quot;..&quot;)#\belastingen\testingnew.bat&quot;
ARGUMENTS=&quot;#stringinfo#&quot;
TIMEOUT=&quot;10&quot;/>


</CFLOCK>
<CFLOCATION URL=&quot;AFDRUK.HTM&quot; ADDTOKEN=&quot;No&quot; > - tleish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top