Solved

ASP to copy files over network

Posted on 2004-10-19
1
746 Views
Last Modified: 2009-12-16
Can I copy files over a in an internal network using asp ..I have tried putting different paths it doesnt work.

IF I am located on a machine called Zion c:\ftpfiles and i have to move it on Matrix D:\myfiles ...can i do it

please let me know
0
Comment
Question by:rohanbairat3
1 Comment
 
LVL 4

Accepted Solution

by:
BChan earned 30 total points
ID: 12353947
There should be a UNC path typically, a machine such named zion has a UNC of \\Zion  and  matrix will be \\Matrix
assuming your runing the webserver on zion
For this to work the IUSER must have the appropiate rights which may not be possible if IUSR is a local user. The user needs right to the destination file and permission to use the share.

To see if this script will work, put it into a vbs file and runn it as your user (change Server.CreateObject to CreateObject). If it works, for you, then will need to set the IUSR appropietly.

Dim FileToCopy,TargetLOC
FileToCopy="C:\ftpfiles\filename.txt"
TargetLOC="\\Zion\someShare\another.txt"
Set FileSys = Server.CreateObject("Scripting.FileSystemObject")
set mFile= FileSys.GetFile (FileToCopy)
mFile.Copy(TargetLOC)
Set FileSys = Nothing
set mFile= Nothing
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question