469,333 Members | 4,210 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,333 developers. It's quick & easy.

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 1854
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 zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by haryvincent176 | last post: by
reply views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.