GoogleDude Posted September 12, 2007 Share Posted September 12, 2007 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 soThanksGoogleDude Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 12, 2007 Share Posted September 12, 2007 (edited) try doing FileWrite($file_var, "ServerPath " & '"' & $path & '"') at least if I'm understanding you correctly. Edited September 12, 2007 by dbzfanatic Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
GoogleDude Posted September 12, 2007 Author Share Posted September 12, 2007 Thanks that did the trick. Now for the next step. How can I replace the \ with a / in the PATH? Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 12, 2007 Share Posted September 12, 2007 Why would you need to? Windows should read the path the same either way but if you MUST you could use StringReplace. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
GoogleDude Posted September 12, 2007 Author Share Posted September 12, 2007 (edited) 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 September 12, 2007 by GoogleDude Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 12, 2007 Share Posted September 12, 2007 You could use that or do just use FileReadLine to get the line(s) you need. I think either way will work. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now