When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles
Related Web Technologies
User Tips!
Coding Tips

Sample Chapters
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Stump the SQL Guru!
XML Info
Author an Article
Print this page.
Using FSO to Access a File on a Remote Computer

Did you know that you can use FSO to open or create a text file on a remote computer? The computer must be part of your network, and shared out correctly. If these conditions are met, though, you can use FSO in a fashion similar to:

Const ForReading = 1 Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set MyFile = objFSO.OpenTextFile("\\<machinename>\myfile.txt", ForReading)

Before you rush out and try this, first realize that this will probably generate an error.

With IIS 4.0, security issues make it a little difficult to work with files on remote computers using FSO. In fact, you have to jump through several hoops to get this working. Thankfully, Microsoft has written a TechNet article on this, which explains what security settings you'll need to fiddle with...

  • http://support.microsoft.com/default.aspx?scid=kb;EN-US;197964

    Supposedly this is suppose to be fixed for Windows 2000... Of course we'll have to wait and see!

    Happy Programming!

    FAQ Table of Contents   Iterating through the FileSystemObject Collections  

  • ASP.NET [1.x] [2.0] | ASPFAQs.com | Advertise | Feedback | Author an Article