Copying files from Server to Server

Results 1 to 3 of 3

Thread: Copying files from Server to Server

  1. #1
    Join Date
    Dec 1969

    Default Copying files from Server to Server

    Hi All,<BR><BR>I&#039;ve read through the FAQ&#039;s on FileSystemObjects, but cant quite find the answer I&#039;m looking for. I am trying to copy a file from one server (SERVER1) to another (SERVER2). SERVER1 has the ASP page on it and a shared directory which lies on SERVER2. <BR><BR>I believe I have set up the permissions correctly for IUSR_SERVER1 to access the SERVER2 share, but I&#039;m not quite sure. I created a user on SERVER2 called IUSR_SERVER1 and gave it read, write permissions to the share. (Perhaps I set this up wrong?)<BR><BR>When I run my script, I don&#039;t get any permission denied errors. instead, I get "Page cannot be displayed" error. <BR><BR>Here is the code that makes the copy file call:<BR><BR>Dim SERVERapproved<BR>SERVERapproved ="K:Approval Folder\" <BR>&#039;This is the shared folder from SERVER1<BR><BR>Set objFSO=Server.CreateObject("Scripting.FileSystemOb ject")<BR>Set f=objFSO.CreateTextFile("C:Approvalsapproved.txt", true)<BR>objFSO.CopyFile (f, SERVERapproved,true)<BR>Set f=nothing<BR>Set objFSO=Nothing<BR><BR>If anyone has any suggestions, I would appreciate it.<BR><BR>THANKS!!<BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Not sure

    but who about writing something to the file and THEN trying to copy it.<BR><BR><BR>The page cannot be displayed is not really your FSO problem IMO...maybe comment out this code and see if the page displays<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: That won't work...

    If you trying to copy a file from Server(A) to Server(B) within the same workgroup then you are in luck, otherwise it can&#039;t be done (as far as I know).<BR><BR>Here is your list:<BR>1) Make sure you have Wsript 5.6 or greater installed on both servers (I have only tested this on server2000).<BR>2) Use UNC paths to the share.<BR>example: \youre servershare1folder1<BR><BR>That should get you closer.<BR><BR>If you need more help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts