I have the form for user to fill out and generated the syntax based on what
they enter. I am using this code to generate the syntax in text format.
<cffile action="append" file="#getdirectoryfrompath(path_translated)#
Script.txt"
output=?cn=fname m lname, ou=CT,c=US, Action:action?
In the text file, I want to able to display the first added record at the
bottom and last added record at the top. The example below is how my text file
look like
A:
cn=RICHARD J COLES,
ou=CT,c=US,
Action: Add
dn:cn=Mike Cole,
ou=CS, c=US
changetype: Del
Richard has been added to the file before Mike. How can I convert the order
as B?
B:
dn:cn=Mike Cole,
ou=CS, c=US,
Action: Del
cn=RICHARD J COLES,
ou=CT, ou=Local, ou=IT, c=US
changetype: Add
Thanks
philh - 30 Aug 2005 17:41 GMT
kt03,
Read the script file into a variable. Concatenate what the user entered with
that variable, and write it back to the script file.
<cfset enteredstuff="#whattheyentered#">
<cffile action="READ" file="#getdirectoryfrompath(path_translated)#
Script.txt" variable="filetext">
<cfset filetext=enteredstuff&chr(13)&filetext>
<cffile action="WRITE" file="#getdirectoryfrompath(path_translated)#
Script.txt" output="#filetext#" NAMECONFLICT="OVERWRITE">
HTH,
kt03 - 30 Aug 2005 18:42 GMT
HTH,
I don't really get your point. Would you more specific or even an example?
The user enters name and selected the action. But ou and c are hardcode.
thanks