Does the FileCopy function only accept local filesystem?

Giganews Newsgroups
Subject: Does the FileCopy function only accept local filesystem?
Posted by:  Zark3 (Zark3n…@gmail.com)
Date: Thu, 17 Jul 2008

Dear all,

In an excel macro I want to use the FileCopy function to copy a file,
but it bails out saying error# 52 invalid file name or number
(translated from local message). My suspicion is that FileCopy does
not accept https links, is that correct?

Code sample:
        Dim sSharepointSite: sSharepointSite = Cells(rBuCell.Row + 1,
rBuCell.Column).Value
        Dim sSharepointUrl: sSharepointUrl = "https://portal.
[mysite].com/finrap/" & sSharepointSite & "/Gedeelde%20documenten/" &
sPeriodLabel & "/"
        If Len(Dir(sPathTelefoon)) > 0 Then MsgBox sSharepointUrl &
Dir(sPathTelefoon)
        If Len(Dir(sPathTelefoon)) > 0 Then Call
FileCopy(sPathTelefoon, sSharepointUrl & Dir(sPathTelefoon))

sSharepointUrl is constructed accurately as is sPathTelefoon (reading
from the msgbox)...

Thanks for any tips,
Chris

Replies