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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File on remote machine

Status
Not open for further replies.

ekbranson

Programmer
Jan 12, 2004
52
US
Hello, I was curious if anyone might be able to help me out. I would like to able to store files on a remote computer. I would like user to be able to download and upload these files with out mapping the drive to there machines. This will all be done through a web interface, with the server running IIS. I was trying to use the FileSystemObject with no success. Any Ideas?
 
And what about ftp ? IIS server can provide ftp service.

Hope This Help
PH.
 
The problem you are experienceing is due to the fact that the FileSystemObject does not support UNC paths. So if you are not mapping a drive you are going to experience some trouble.
 
Well contrary to persistent rumors UNC paths work just fine with the FSO. I have to wonder where these things start.

For example, if I create a file
Code:
C:\removeme\test.txt
on a machine named
Code:
red12
and run the following script with admin rights to
Code:
red12
it returns True just as expected:

fsotest.wsf
Code:
<job>
 <object id=&quot;objFSO&quot; progid=&quot;Scripting.FileSystemObject&quot;/>
 <script language=&quot;VBScript&quot;>
   MsgBox CStr(objFSO.FileExists(&quot;\\red12\C$\removeme\test.txt&quot;))
 </script>
</job>
That example uses the administrative share
Code:
C$
but regular shares work fine too.


If you are using IIS, one option may be Web Folders. Here are some links on the subject:






I don't think that the FSO will work with Web Folders, and I don't know how they can be opened for reading or writing directly but I imagine there is a way because Office products can save to them. Maybe Office programs copy to/from a temporary location and just do the writes/reads there?

You should be able to &quot;upload/download&quot; (copy) files though. You may want to look into the Windows Shell object (progid=&quot;Shell.Application&quot;) for this.
 
Thanks alot, I will will review the sites. No program will be used to read/write these files through the web interface. It is more a signout/signin of files. The application that will run the file will be on the users machines. Again, thanks alot.

 
If you are running Windows 2003 you might want to check out Windows Sharepoint Services which is a free download and install off of the Microsoft web site. It has a document library feature that has full check in/check out capabilities.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top