473,573 Members | 2,806 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FileSystemObjec t 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( "..\..\..\files hare\FILENAME.I NI")

Set FSO = Server.CreateOb ject("Scripting .FileSystemObje ct")

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

fso.CopyFile MyFile,CopyDest
What am I missing? It's gotta be something simple.
Sep 19 '07 #1
6 1922
use a response.write to verify physical path names .
"Mo Bandy" <mo*****@divxin fo.netwrote in message news:eX******** ********@TK2MSF TNGP06.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( "..\..\..\files hare\FILENAME.I NI")

Set FSO = Server.CreateOb ject("Scripting .FileSystemObje ct")

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

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.supe rnews.com...
use a response.write to verify physical path names .
"Mo Bandy" <mo*****@divxin fo.netwrote in message
news:eX******** ********@TK2MSF TNGP06.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( "..\..\..\files hare\FILENAME.I NI")

Set FSO = Server.CreateOb ject("Scripting .FileSystemObje ct")

'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.CreateOb ject("Scripting .FileSystemObje ct")
Server.CreateOb ject 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*****@divxin fo.netwrote in message news:%2******** **********@TK2M SFTNGP02.phx.gb l...
>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.supe rnews.com...
>use a response.write to verify physical path names .
"Mo Bandy" <mo*****@divxin fo.netwrote in message news:eX******** ********@TK2MSF TNGP06.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( "..\..\..\files hare\FILENAME.I NI")

Set FSO = Server.CreateOb ject("Scripting .FileSystemObje ct")

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

fso.CopyFil e 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.supe rnews.com...
if the path names are truly valid, yes.

test by trying to open the resulting path in another application
"Mo Bandy" <mo*****@divxin fo.netwrote in message
news:%2******** **********@TK2M SFTNGP02.phx.gb l...
>>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.sup ernews.com...
>>use a response.write to verify physical path names .
"Mo Bandy" <mo*****@divxin fo.netwrote in message
news:eX****** **********@TK2M SFTNGP06.phx.gb l...
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( "..\..\..\files hare\FILENAME.I NI")

Set FSO = Server.CreateOb ject("Scripting .FileSystemObje ct")

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

fso.CopyFi le 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
4050
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
4648
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 presented with a username/password box when they view the page. No matter what I do, when the page attempts to access the remote server, I get a...
3
2106
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 directory on our database server, and they must stay there. I want to use the FileSystemObject (running on our Intranet server) to check if a photo is...
2
2169
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 folder? -- Sean.
9
3893
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', 'Scripting', 'Scripting.FileSystemObject', and a few others However, when I try to create the fso object I keep receiving an error. 'ActiveX...
4
1280
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 question which may have some relevance to asp.net users. I am trying to run an asp page on my local Windows 2000 machine which creates a folder...
1
17092
by: G Gerard | last post by:
Hello I am using the FileSystemObject to copy files on a computer Dim MyObject as Object
5
5180
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 doesn't support long string(Maximum 255), which gives me problem passing information longer than 255 through querystring. So I have to use an...
3
5898
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, Access confuses the commas for field separators, so that a block of text which should all be in one field ends up in two fields. I've seen by reading...
1
9396
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 move the logic to the next instance in the loop (again, testing if the URL path exists). I have a check_path function for these cases with the...
0
7776
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7686
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8014
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
6407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3730
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3731
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2197
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 we have to send another system
1
1297
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1038
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.