PC Review


Reply
Thread Tools Rate Thread

Copy .xls betwen local disk and https:// location

 
 
avardaneg
Guest
Posts: n/a
 
      1st Jul 2008
I'm trying to find a way to copy files back and forth between my local disk
and a https:// network location that requires ID an password. After some
research through this forum I was able to find some pieces of code that
allowed me to save a file to the network via "Save As". The problem is that
I'd like to keep the same time stamp between the local file and its copy in
the network... I've tried FileCopy, Copyfile, etc... nothing seems to work
when I try to copy the file instead of doing "Save As". Any suggestions? Beow
you'll find the code I have so far:

Sub test2()

Dim source As String
Dim destination As String

Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = False
.Navigate "https://myprotectedsite.com/"
Do Until .ReadyState = 4
DoEvents
Loop
Set ipf = .Document.all.Item("_ctl1:email")
If ipf Is Nothing Then GoTo skiplogin:
ipf.Value = "(E-Mail Removed)"
Set ipf = .Document.all.Item("_ctl1assword")
ipf.Value = "mypwd"
Set ipf = .Document.all.Item("_ctl1:SigninBtn")
Do Until .ReadyState = 4
DoEvents
Loop
ipf.Click
Do Until .ReadyState = 4
DoEvents
Loop
End With
skiplogin:
source = "C:\Mylocalfolder\test.xls"
destination = "https://myprotectedsite.com/test.xls"

FileCopy source, destination ' ->>> Run time error 52 - Bad file name or
number

ie.Quit

End Sub

 
Reply With Quote
 
 
 
 
jaf
Guest
Posts: n/a
 
      1st Jul 2008

Hi,
I don't think you can do a copy or filecopy to a http server. FTP maybe.
Windows does have a "web folders" add-on. I think it was an Office add-on.
You would need to be accessing the web server as a remote drive.

John


"avardaneg" <(E-Mail Removed)> wrote in message
news:B25002F3-D599-4319-8A90-(E-Mail Removed)...
> I'm trying to find a way to copy files back and forth between my local
> disk
> and a https:// network location that requires ID an password. After some
> research through this forum I was able to find some pieces of code that
> allowed me to save a file to the network via "Save As". The problem is
> that
> I'd like to keep the same time stamp between the local file and its copy
> in
> the network... I've tried FileCopy, Copyfile, etc... nothing seems to work
> when I try to copy the file instead of doing "Save As". Any suggestions?
> Beow
> you'll find the code I have so far:
>
> Sub test2()
>
> Dim source As String
> Dim destination As String
>
> Set ie = CreateObject("InternetExplorer.Application")
> With ie
> .Visible = False
> .Navigate "https://myprotectedsite.com/"
> Do Until .ReadyState = 4
> DoEvents
> Loop
> Set ipf = .Document.all.Item("_ctl1:email")
> If ipf Is Nothing Then GoTo skiplogin:
> ipf.Value = "(E-Mail Removed)"
> Set ipf = .Document.all.Item("_ctl1assword")
> ipf.Value = "mypwd"
> Set ipf = .Document.all.Item("_ctl1:SigninBtn")
> Do Until .ReadyState = 4
> DoEvents
> Loop
> ipf.Click
> Do Until .ReadyState = 4
> DoEvents
> Loop
> End With
> skiplogin:
> source = "C:\Mylocalfolder\test.xls"
> destination = "https://myprotectedsite.com/test.xls"
>
> FileCopy source, destination ' ->>> Run time error 52 - Bad file name
> or
> number
>
> ie.Quit
>
> End Sub
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
local https web site CSharper Microsoft C# .NET 2 6th Nov 2009 07:03 PM
OWA HTTPS PROBLEM FOR LOCAL LAN ACCESS =?Utf-8?B?QmrDuHJuIFIu?= Microsoft Outlook Discussion 6 6th Oct 2005 05:04 PM
Using FileStream object to read JPEG File from Https location. =?Utf-8?B?TWFyaw==?= Microsoft ASP .NET 3 30th Dec 2003 09:03 AM
HTTP 1.0 302 Found Location https://....... Alexandre Windows XP Internet Explorer 0 11th Sep 2003 09:00 PM
Re: Clear destination, then copy betwen workbooks John Wilson Microsoft Excel Programming 3 22nd Jul 2003 02:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:08 PM.