Jump to content
Sign in to follow this  
GoogleDude

Syntax formatting help!

Recommended Posts

GoogleDude

I am trying to have the below line in my script but I am unable to figure out the correct formatting of the syntax.

FileWrite($file_var, ServerPath "$path") but the part that is confusing me is that the $path var needs to be wrapped by quates.

so when I look at the file that was written I need it to be like below.

ServerPath "C:\ Documents and Settings\All Users\ServerNode"

Make sense?

Hope so

Thanks

GoogleDude

Share this post


Link to post
Share on other sites
dbzfanatic

try doing

FileWrite($file_var, "ServerPath " & '"' & $path & '"')

at least if I'm understanding you correctly.

Edited by dbzfanatic

Share this post


Link to post
Share on other sites
GoogleDude

Thanks that did the trick. Now for the next step. How can I replace the \ with a / in the PATH?

Share this post


Link to post
Share on other sites
dbzfanatic

Share this post


Link to post
Share on other sites
GoogleDude

Thanks. I read in the help on StringReplace but I cant see where I specify the file in which I need certain strings replaced. The file in question has several lines in it that will have a \ in it, but I onlt need to replace some of them.

Thanks again for the feedback.

EDIT: I just came across _ReplaceStringInFile I think that is what I am looking for?

GoogleDude

Edited by GoogleDude

Share this post


Link to post
Share on other sites
dbzfanatic

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  

×