Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Using URL in OpenTextFile

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,31638
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Using URL in OpenTextFile
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Using URL in OpenTextFile - 2/28/2006 6:45:56 AM   
  panex

 

Posts: 1
Score: 0
Joined: 2/6/2006
Status: offline
Hello everyone...

Here is my question:

I have an asp page in one server(server1), and a txt file in another server(sever2)...

I would like to open this txt file through the command OpenTextFile, using  the following code:

Const ForReading = 1, ForWriting = 2, ForAppending = 3, TristateFalse=0
'Dim FileName, f,fs,TextBody
'FileName = http://192.146.0.1/folder/text.txt
'Set fs = CreateObject("Scripting.FileSystemObject")
'Set f=fs.OpenTextFile(FileName,ForReading,TristateFalse)

However, the command OpenTextFile expects a physical path and not a URL...How can i solve that????

Since the page and the file are in different servers, the comand Server.MapPath can't be used...

Any help will be really, really apreciated!!!!!!

Thanks in advance !!!!!

Daniel


 
 
Post #: 1
 
 RE: Using URL in OpenTextFile - 3/6/2006 2:35:49 AM   
  ebgreen


Posts: 5069
Score: 31
Joined: 7/12/2005
Status: offline
I have no reason to expect it to work and I can't test it right now, but have you tried:

FileName = File://192.146.0.1/folder/text.txt

Also, the name needs to be double quoted.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to panex)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Using URL in OpenTextFile Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts