472,133 Members | 974 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,133 software developers and data experts.

FileSystemObject question

Using FSO I want to copy a file from the web server to a mapped network
drive (Novell server) using a physical path. However I keep getting an error
(path not found). Can someone help please...thanks. Code summary below.

'get the Physical Path of file
MyFile = Server.MapPath("..\..\..\fileshare\FILENAME.INI")

Set FSO = Server.CreateObject("Scripting.FileSystemObject")

'copy file to novell server
dim CopyDest
CopyDest = "f:\temp\" (also tried using:) CopyDest =
"\\servername\temp\"

fso.CopyFile MyFile,CopyDest
What am I missing? It's gotta be something simple.
Sep 19 '07 #1
6 1893
use a response.write to verify physical path names .
"Mo Bandy" <mo*****@divxinfo.netwrote in message news:eX****************@TK2MSFTNGP06.phx.gbl...
Using FSO I want to copy a file from the web server to a mapped network drive (Novell server) using a physical path. However I
keep getting an error (path not found). Can someone help please...thanks. Code summary below.

'get the Physical Path of file
MyFile = Server.MapPath("..\..\..\fileshare\FILENAME.INI")

Set FSO = Server.CreateObject("Scripting.FileSystemObject")

'copy file to novell server
dim CopyDest
CopyDest = "f:\temp\" (also tried using:) CopyDest = "\\servername\temp\"

fso.CopyFile MyFile,CopyDest
What am I missing? It's gotta be something simple.

Sep 19 '07 #2
I did that and it looked correct. So the code I used should work providing
the physical path returned is valid...yeah?

"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:13*************@corp.supernews.com...
use a response.write to verify physical path names .
"Mo Bandy" <mo*****@divxinfo.netwrote in message
news:eX****************@TK2MSFTNGP06.phx.gbl...
>Using FSO I want to copy a file from the web server to a mapped network
drive (Novell server) using a physical path. However I keep getting an
error (path not found). Can someone help please...thanks. Code summary
below.

'get the Physical Path of file
MyFile = Server.MapPath("..\..\..\fileshare\FILENAME.INI")

Set FSO = Server.CreateObject("Scripting.FileSystemObject")

'copy file to novell server
dim CopyDest
CopyDest = "f:\temp\" (also tried using:) CopyDest =
"\\servername\temp\"

fso.CopyFile MyFile,CopyDest
What am I missing? It's gotta be something simple.


Sep 19 '07 #3
"Mo Bandy" wrote:
...Using FSO I want to copy a file from the web server to a mapped
network drive (Novell server) using a physical path...

...Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Server.CreateObject suggests this is running as an ASP script. In that case,
the account IIS is running under must have the necessary privileges to
connect to that share. Mapping the drive in your Windows session is
insufficient, as it is a USER mapping.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

Sep 19 '07 #4
if the path names are truly valid, yes.

test by trying to open the resulting path in another application
"Mo Bandy" <mo*****@divxinfo.netwrote in message news:%2******************@TK2MSFTNGP02.phx.gbl...
>I did that and it looked correct. So the code I used should work providing the physical path returned is valid...yeah?

"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message news:13*************@corp.supernews.com...
>use a response.write to verify physical path names .
"Mo Bandy" <mo*****@divxinfo.netwrote in message news:eX****************@TK2MSFTNGP06.phx.gbl...
>>Using FSO I want to copy a file from the web server to a mapped network drive (Novell server) using a physical path. However I
keep getting an error (path not found). Can someone help please...thanks. Code summary below.

'get the Physical Path of file
MyFile = Server.MapPath("..\..\..\fileshare\FILENAME.INI")

Set FSO = Server.CreateObject("Scripting.FileSystemObject")

'copy file to novell server
dim CopyDest
CopyDest = "f:\temp\" (also tried using:) CopyDest = "\\servername\temp\"

fso.CopyFile MyFile,CopyDest
What am I missing? It's gotta be something simple.



Sep 19 '07 #5
I wrote:
...the account IIS is running under must have the necessary
privileges to connect to that share...
I should have also said that this article has some possible solutions:
http://www.aspfaq.com/show.asp?id=2168

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

Sep 19 '07 #6
I will try...thanks for your help and validation.

"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:13*************@corp.supernews.com...
if the path names are truly valid, yes.

test by trying to open the resulting path in another application
"Mo Bandy" <mo*****@divxinfo.netwrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...
>>I did that and it looked correct. So the code I used should work providing
the physical path returned is valid...yeah?

"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:13*************@corp.supernews.com...
>>use a response.write to verify physical path names .
"Mo Bandy" <mo*****@divxinfo.netwrote in message
news:eX****************@TK2MSFTNGP06.phx.gbl.. .
Using FSO I want to copy a file from the web server to a mapped network
drive (Novell server) using a physical path. However I keep getting an
error (path not found). Can someone help please...thanks. Code summary
below.

'get the Physical Path of file
MyFile = Server.MapPath("..\..\..\fileshare\FILENAME.INI")

Set FSO = Server.CreateObject("Scripting.FileSystemObject")

'copy file to novell server
dim CopyDest
CopyDest = "f:\temp\" (also tried using:) CopyDest =
"\\servername\temp\"

fso.CopyFile MyFile,CopyDest
What am I missing? It's gotta be something simple.



Sep 19 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by John Dewbert | last post: by
2 posts views Thread by Sean S - Perth, WA | last post: by
4 posts views Thread by Stimp | last post: by
1 post views Thread by G Gerard | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.