Sign in to follow this  
Followers 0
ragemxf

append@username at end of file

8 posts in this topic

filewriteline("c:\adx\adx.ini","@username")

when I use this script, the last line in file reads

UserDir=W:\adx\users\@username

I want to get this to paste the logged on users name in this txt file...

How can I do it?

Share this post


Link to post
Share on other sites



Leave out the quotation marks:

filewriteline("c:\adx\adx.ini",@username)

Regards,

Buffo

Share this post


Link to post
Share on other sites

what if I need a trailing backslash?

Share this post


Link to post
Share on other sites

this is what happens when I ues this script...

filewriteline("c:\adx\adx.ini",@username)

filewriteline("c:\adx\adx.ini","\")

UserDir=W:\adx\users\paa7010

\

Share this post


Link to post
Share on other sites

i could probably do this using fileopen and then filewrite....

but I am unsure of what the Filehandle is?

it is line 50 that I am trying to edit

Share this post


Link to post
Share on other sites

this is what happens when I ues this script...

filewriteline("c:\adx\adx.ini",@username)

filewriteline("c:\adx\adx.ini","\")

UserDir=W:\adx\users\paa7010

\

If you write 2 lines you get 2 lines.

Use:

filewriteline("c:\adx\adx.ini",@username&"\")

HTH, Reinhard

Share this post


Link to post
Share on other sites

If you write 2 lines you get 2 lines.

Use:

filewriteline("c:\adx\adx.ini",@username&"\")

HTH, Reinhard

I noticed you're editing an ini file. Are there section names in the ini? If so...

IniWrite('c:\adx\adx.ini', "SectionName", "UserDir", @Username & '\')

Ben

Share this post


Link to post
Share on other sites

thats what I needed thanks....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0