Results 1 to 7 of 7

Thread: Copying files to Frontpage webservers

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2003
    Location
    Chicagoland
    Posts
    92

    Copying files to Frontpage webservers

    At work, I have full rights to a Frontpage webserver since I have to maintain a web page. In an attempt to automate the procedure, I wanted to write an asp app that would pull the information from an Access DB and display it. However, the group in charge, for reasons they won't fully explain, won't let me do it. But that's another rant.

    So I worked around it by creating the html on my hard drive then I have to manually copy the files to the Frontpage webserver doing drag and drop. Is there anyway to programattically copy these files over to the webserver? I've tried mapping a dedicated drive, but that doesn't work. And I can't ftp to it either.

    Any ideas?

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Nov 2003
    Location
    Chicagoland
    Posts
    92
    [bump]

    Bueller? Bueller? Bueller?

    Hello? Is this thing on?

  3. #3
    Hyperactive Member
    Join Date
    Apr 2003
    Location
    Three Rivers, MI
    Posts
    354
    Will XCopy work? If so you can just write a batch file that can be triggered with Task Manager to do the updates on a regular basis. Since you can drag & drop already it sounds as though you have the permission you need to do it.

    Something like this:

    xcopy C:\myDirectory\*.* L:\inetpub\wwwroot\ /i /s /e /y /h

  4. #4
    Hyperactive Member
    Join Date
    Apr 2003
    Location
    Three Rivers, MI
    Posts
    354
    Oops for a server your Xcopy should look more like this:

    xcopy C:\myDirectory\*.* \\ServerName\c$\Inetpub\wwwroot /i /s /e /y /h

    ServerName should be replaces with what ever you server is named.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Nov 2003
    Location
    Chicagoland
    Posts
    92
    I'm not too sure about xcopy. Isn't that just a deployment method?

    I want my app to automattically copy the files to the webserver when I click the button on my GUI.

    I've tried:
    VB Code:
    1. File.Copy("xcopy C:\output\test.htm", "http://178.13.25.32/downloads/test.htm")
    (I changed the IP address)
    But I get an error saying that the destination path is not supported.

  6. #6
    Hyperactive Member
    Join Date
    Apr 2003
    Location
    Three Rivers, MI
    Posts
    354
    I feel pretty dumb now but I missed the fact that you wanted to do this programmatically. Sorry. You can copy files individually like this but I would think that this isn't the best way to do it.
    VB Code:
    1. Dim Source As String = "C:\myDirectory\test.htm"
    2.         Dim Destination As String = _
    3.             "\\178.13.25.32\c$\Inetpub\wwwroot\downloads\test.htm"
    4.         Try
    5.             System.IO.File.Copy(Source, Destination, True)
    6.         Catch ex As Exception
    7.             MsgBox("Error: " & ex.Message)
    8.         End Try

    I would think you would want to copy the entire directory but I am not sure how to do that and it seems that Wild Cards don't work with System.IO.File.Copy.

    Here is the code anyway. Maybe it will help you get started. By the way I don't think you can do it the way you posted because of the problems it may cause with IIS.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Nov 2003
    Location
    Chicagoland
    Posts
    92
    Got it. I gotta learn this IIS stuff. I had to use a slightly different destination path (yours ended up locking my accout, lol).

    Here is what I used (IP address has been changed to protect the innocent):
    VB Code:
    1. Dim Destination As String = "\\178.13.25.32\Inetpub_new\wwwroot\Downloads\"

    Thanks, BukHix

Posting Permissions

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



Click Here to Expand Forum to Full Width