Solved

ASP to copy files over network

Posted on 2004-10-19
1
744 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now