FileSystemObject question

FileSystemObject question

am 19.09.2007 19:16:47 von Mo Bandy

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.

Re: FileSystemObject question

am 19.09.2007 19:42:29 von Jon Paal

use a response.write to verify physical path names .


"Mo Bandy" wrote in message news:eXRONDu%23HHA.1484@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.
>

Re: FileSystemObject question

am 19.09.2007 20:18:28 von Mo Bandy

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]" wrote in message
news:13f2nrhdem3jn2d@corp.supernews.com...
> use a response.write to verify physical path names .
>
>
> "Mo Bandy" wrote in message
> news:eXRONDu%23HHA.1484@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.
>>
>
>

Re: FileSystemObject question

am 19.09.2007 20:33:58 von Dave Anderson

"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.

Re: FileSystemObject question

am 19.09.2007 20:39:38 von Jon Paal

if the path names are truly valid, yes.

test by trying to open the resulting path in another application


"Mo Bandy" wrote in message news:%23B6dqlu%23HHA.3916@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]" wrote in message news:13f2nrhdem3jn2d@corp.supernews.com...
>> use a response.write to verify physical path names .
>>
>>
>> "Mo Bandy" wrote in message news:eXRONDu%23HHA.1484@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.
>>>
>>
>>
>
>

Re: FileSystemObject question

am 19.09.2007 20:43:03 von Dave Anderson

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.

Re: FileSystemObject question

am 19.09.2007 20:50:08 von Mo Bandy

I will try...thanks for your help and validation.

"Jon Paal [MSMD]" wrote in message
news:13f2r6m87rj9k3f@corp.supernews.com...
> if the path names are truly valid, yes.
>
> test by trying to open the resulting path in another application
>
>
> "Mo Bandy" wrote in message
> news:%23B6dqlu%23HHA.3916@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]" wrote in message
>> news:13f2nrhdem3jn2d@corp.supernews.com...
>>> use a response.write to verify physical path names .
>>>
>>>
>>> "Mo Bandy" wrote in message
>>> news:eXRONDu%23HHA.1484@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.
>>>>
>>>
>>>
>>
>>
>
>