Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing files via UNC... 1

Status
Not open for further replies.

GSMike

Programmer
Feb 7, 2001
143
US
Can anyone tell me how to create, read, write to, etc. files in VB using the UNC, instead of the drive mappings?
Currently, I do things like,
Code:
sub mike()
dim fso as new filesystemobject, ts as textstream
set ts=fso.createtextfile("q:\temp.txt")
ts.writeline "this is a test"
ts.close
end sub

Is there a way to do the same thing, but instead of using "q:\test.txt", use "\\myserver\myshare\test.txt"??

Thanks!!! Mike K
 
Open "\\SRVN1\SomePath\SomeFile.txt" For Output As #1
Write #1, "this is a test"
Close #1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top