473,471 Members | 4,687 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1920
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John Dewbert | last post by:
*** post for FREE via your newsreader at post.newsfeed.com *** Hello, I have trouble passing a folder object (from a FileSystemObject) to a sub procedure. Consider the following code: ...
1
by: Scott MacLean | last post by:
I'm pulling my hair out over this one. I've got a web page that I need to have write to another server across the network. The site in question does NOT run in anonymous mode, that is, the user is...
3
by: Steve | last post by:
Hi all, FileSystemObject question... I'm trying to check if files exist or not, but the files are not sitting on the same server as our Intranet. Basically we have about 5000 photos in a...
2
by: Sean S - Perth, WA | last post by:
Hi all, If I create a FileSystemObject Object is it appropriate to reuse it to perform operations on different files/folders? Or should I create a new FileSystemObject Object for each file and...
9
by: kermit | last post by:
I keep seeing that you can use the FileSystemObject in either VB script, or Javascript on an aspx page. I added a refrence to the scrrun.dll I added importing namespaces for 'System.Object',...
4
by: Stimp | last post by:
This is a query to do with classic ASP (written through vbscript). I apologise in advance to posting to an ASP.NET forum, but my newsserver doesn't have any others listed... plus it's a permissions...
1
by: G Gerard | last post by:
Hello I am using the FileSystemObject to copy files on a computer Dim MyObject as Object
5
by: VancouverMike | last post by:
Hi there, I am writing a web app using asp.net 1.1 and C#. This web app is launched in another win32 application and this app needs to pass information to my web app. But this win32 application...
3
by: brigitte | last post by:
The original problem: I need a procedure to import a csv file created by a third party application into an Access database. This file contains fields which may include commas, and when they do,...
1
by: pbd22 | last post by:
Hi - I have code that automatically fills tabs on a page. In some cases, a URL path won't be correct (the folder and files don't exist) and, in these cases, I want to catch these exceptions and...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.