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

FSO problem

Status
Not open for further replies.

sweetleaf

Programmer
Jan 16, 2001
439
CA
Hi everyone,

I want to allow a user to move files from their hard drive to a network drive using a file input type and FSO.

when testing from my pc i can use the folowing code no problem:

Dim fso
fileName = bb
Response.Write("NNN: " & fileName)
Set fso = CreateObject("Scripting.FileSystemObject")
fso.MoveFile fileName, "\\VENUS\Inetpub$\
BUT when testing from the VENUS network drive it crahses at this line:
fso.MoveFile fileName, "\\Ex_tor_dev\Inetpub$\
Does anyone know why that is??

any help is GREATLY appreciated!!
 
Try to use a side way cuz the FSO object could not copy or move between two calcs...

set wn=CreateObject("WScript.Network.1")
wn.MapNetworkDrive "Z:","\\VENUS\Inetpub$\Set fso = CreateObject("Scripting.FileSystemObject")
fso.MoveFile fileName,"Z:\"
wn.RemoveNetworkDrive "Z:"
________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top