Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > FileSystemObject question

Reply
Thread Tools

FileSystemObject question

 
 
Mo Bandy
Guest
Posts: n/a
 
      09-19-2007
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.


 
Reply With Quote
 
 
 
 
Mo Bandy
Guest
Posts: n/a
 
      09-19-2007
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 com> wrote in message
news:...
> use a response.write to verify physical path names .
>
>
> "Mo Bandy" <> wrote in message
> news:eXRONDu%...
>> 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.
>>

>
>



 
Reply With Quote
 
 
 
 
Dave Anderson
Guest
Posts: n/a
 
      09-19-2007
"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.

 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      09-19-2007
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.

 
Reply With Quote
 
Mo Bandy
Guest
Posts: n/a
 
      09-19-2007
I will try...thanks for your help and validation.

"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot com> wrote in message
news:...
> 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%...
>>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 com> wrote in message
>> news:...
>>> use a response.write to verify physical path names .
>>>
>>>
>>> "Mo Bandy" <> wrote in message
>>> news:eXRONDu%...
>>>> 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.
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script w/ FileSystemObject, error creating object =?Utf-8?B?a2VybWl0?= ASP .Net 8 04-24-2005 12:47 PM
FileSystemObject Question =?Utf-8?B?UGF0cmljay5PLklnZQ==?= ASP .Net 4 11-22-2004 03:35 AM
(Newbie Question): GetFolder & FileSystemObject on Development PC The Frog ASP General 3 08-02-2004 03:13 PM
FileSystemObject question... Steve ASP General 3 01-15-2004 05:30 PM
IIS 5.0 / Win2k Hangs up when Reading file using Server.FileSystemObject Pedro Bautista ASP .Net 0 08-28-2003 11:56 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57