|
-
May 24th, 2004, 09:15 AM
#1
Thread Starter
Lively Member
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?
-
May 25th, 2004, 09:07 AM
#2
Thread Starter
Lively Member
[bump]
Bueller? Bueller? Bueller?
Hello? Is this thing on?
-
May 25th, 2004, 10:38 AM
#3
Hyperactive Member
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
-
May 25th, 2004, 10:44 AM
#4
Hyperactive Member
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.
-
May 25th, 2004, 03:57 PM
#5
Thread Starter
Lively Member
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:
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.
-
May 26th, 2004, 09:57 AM
#6
Hyperactive Member
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:
Dim Source As String = "C:\myDirectory\test.htm"
Dim Destination As String = _
"\\178.13.25.32\c$\Inetpub\wwwroot\downloads\test.htm"
Try
System.IO.File.Copy(Source, Destination, True)
Catch ex As Exception
MsgBox("Error: " & ex.Message)
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.
-
May 26th, 2004, 03:48 PM
#7
Thread Starter
Lively Member
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:
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|