<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: copyFile not recognize in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536436#M37435</link>
    <description>I also heard the sky is falling but  I could not remember all the arguments on this either. If you search the internet it was mentioned somewhere on the internet. That is why I am keeping my head in the ground&lt;BR /&gt;
&lt;BR /&gt;
Regards</description>
    <pubDate>Sun, 22 Jan 2006 23:22:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-01-22T23:22:16Z</dc:date>
    <item>
      <title>copyFile not recognize</title>
      <link>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536430#M37429</link>
      <description>Hello People:&lt;BR /&gt;
    Anyone know what reference is for copyFile, because visualbasic not recognize this command, thanx!!</description>
      <pubDate>Fri, 20 Jan 2006 19:14:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536430#M37429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-01-20T19:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: copyFile not recognize</title>
      <link>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536431#M37430</link>
      <description>You may be thinking of the FileCopy function but I also found this code on &lt;BR /&gt;
the net which may be what your looking for.&lt;BR /&gt;
&lt;BR /&gt;
HTH,&lt;BR /&gt;
&lt;BR /&gt;
Dale.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Public Function CopyFile(srcefile As String, destfile As String, _&lt;BR /&gt;
  errnum As Integer) As Boolean&lt;BR /&gt;
'*****************************************************************&lt;BR /&gt;
'&lt;DESC&gt;		Copies individual files to new location.&lt;/DESC&gt;&lt;BR /&gt;
'&lt;RETURN&gt;		Boolean:&lt;BR /&gt;
'			Success level of function&lt;/RETURN&gt;&lt;BR /&gt;
'&lt;ACCESS&gt;		Public&lt;/ACCESS&gt;&lt;BR /&gt;
'&lt;ARGS&gt;		srcefile:&lt;BR /&gt;
'			Full Filepath &amp;amp; Filename of source&lt;BR /&gt;
'   		destfile:&lt;BR /&gt;
'			Full Filepath &amp;amp; Filename of destination&lt;BR /&gt;
'		&lt;/ARGS&gt;&lt;BR /&gt;
'&lt;USAGE&gt;		blnCopy = CopyFile("c:\autoexec.bat", _&lt;BR /&gt;
'			  "c:\temp\autoexec.old", 0)&lt;/USAGE&gt;&lt;BR /&gt;
'*****************************************************************&lt;BR /&gt;
&lt;BR /&gt;
Dim intAttr As Integer&lt;BR /&gt;
&lt;BR /&gt;
    DoEvents&lt;BR /&gt;
    CopyFile = False&lt;BR /&gt;
&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
    Err = 0&lt;BR /&gt;
    FileCopy srcefile, destfile&lt;BR /&gt;
&lt;BR /&gt;
    Select Case Err&lt;BR /&gt;
        Case 0                  ' OK&lt;BR /&gt;
            CopyFile = True&lt;BR /&gt;
        Case 75                 ' Path/File Access error&lt;BR /&gt;
            intAttr = GetAttr(destfile)&lt;BR /&gt;
            SetAttr destfile, vbNormal&lt;BR /&gt;
            Err = 0&lt;BR /&gt;
            FileCopy srcefile, destfile&lt;BR /&gt;
            If Err = 0 Then&lt;BR /&gt;
                intAttr = intAttr Or vbArchive&lt;BR /&gt;
                SetAttr destfile, intAttr&lt;BR /&gt;
                CopyFile = True&lt;BR /&gt;
            Else&lt;BR /&gt;
                errnum = Err&lt;BR /&gt;
            End If&lt;BR /&gt;
        Case Else               ' Other error&lt;BR /&gt;
            errnum = Err&lt;BR /&gt;
    End Select&lt;BR /&gt;
&lt;BR /&gt;
End Function&lt;JANDRESAEDO&gt; wrote in message &lt;BR /&gt;
news:5065026@discussion.autodesk.com...&lt;BR /&gt;
Hello People:&lt;BR /&gt;
    Anyone know what reference is for copyFile, because visualbasic not &lt;BR /&gt;
recognize this command, thanx!!&lt;/JANDRESAEDO&gt;</description>
      <pubDate>Fri, 20 Jan 2006 19:18:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536431#M37430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-01-20T19:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: copyFile not recognize</title>
      <link>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536432#M37431</link>
      <description>see attached the file, add a reference to MicroSoft Scripting&lt;BR /&gt;
dll file.&lt;BR /&gt;
&lt;BR /&gt;
This dll has many file handling capabilites, use the object browser to see all the features. Also search the internet&lt;BR /&gt;
for "File system object" for more samples on using this.&lt;BR /&gt;
&lt;BR /&gt;
Fred C</description>
      <pubDate>Fri, 20 Jan 2006 23:04:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536432#M37431</guid>
      <dc:creator>fxcastil</dc:creator>
      <dc:date>2006-01-20T23:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: copyFile not recognize</title>
      <link>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536433#M37432</link>
      <description>It is not recommended to use Scripting.FileObject in VB/VBA program, unless &lt;BR /&gt;
you have no other choice. There are many discussions on this topic in many &lt;BR /&gt;
VB/VBA related NGs and on the net. VB/VBA's intrinsic file handling &lt;BR /&gt;
functions can do everything Scripting.FileObject does.&lt;BR /&gt;
&lt;BR /&gt;
&lt;FXCASTIL&gt; wrote in message news:5065260@discussion.autodesk.com...&lt;BR /&gt;
see attached the file, add a reference to MicroSoft Scripting&lt;BR /&gt;
dll file.&lt;BR /&gt;
&lt;BR /&gt;
This dll has many file handling capabilites, use the object browser to see &lt;BR /&gt;
all the features. Also search the internet&lt;BR /&gt;
for "File system object" for more samples on using this.&lt;BR /&gt;
&lt;BR /&gt;
Fred C&lt;/FXCASTIL&gt;</description>
      <pubDate>Sat, 21 Jan 2006 16:21:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536433#M37432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-01-21T16:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: copyFile not recognize</title>
      <link>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536434#M37433</link>
      <description>Norman,&lt;BR /&gt;
&lt;BR /&gt;
Where did you here that !&lt;BR /&gt;
I have read many VBA and VB books and not one ever said&lt;BR /&gt;
do not use the scripting dll or file system object. Even microsoft describes how it easier to use the file system object&lt;BR /&gt;
than VBA file handling functions.&lt;BR /&gt;
&lt;BR /&gt;
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnofftalk/html/office09072000.asp&lt;BR /&gt;
&lt;BR /&gt;
Yes VBA does have a filecopy which performs the same function as a File System object copyFile.&lt;BR /&gt;
&lt;BR /&gt;
But to say that "VBA intrinsic file handling functions can do everything Scripting.FileObject does"&lt;BR /&gt;
&lt;BR /&gt;
That is just not a true statement see attached file.&lt;BR /&gt;
&lt;BR /&gt;
Maximo</description>
      <pubDate>Sun, 22 Jan 2006 14:03:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536434#M37433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-01-22T14:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: copyFile not recognize</title>
      <link>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536435#M37434</link>
      <description>This topic has been beaten to death long time ago and I do not want to &lt;BR /&gt;
repeat it all the benifit of not using Scripting.FileSystem in VB/VBA, nor I &lt;BR /&gt;
could remember all the arguments n this. Just name one of them that is &lt;BR /&gt;
enought to make me stay away with it in my VB/VBA code:&lt;BR /&gt;
&lt;BR /&gt;
You unnecessarily add a reference/dependency to your code. Not to mention &lt;BR /&gt;
different version issue if the users could be using Win98 (or even Win95) to &lt;BR /&gt;
WinXP.&lt;BR /&gt;
&lt;BR /&gt;
If you search various VB NGs, you would find many threads on this topic and &lt;BR /&gt;
almost for each original post, there would be one a more VB/VBA MVP &lt;BR /&gt;
suggesting not to use Scripting.FileSystem, use VB/VBA intrinsic functions &lt;BR /&gt;
instead&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;MAXIMA10&gt; wrote in message news:5065594@discussion.autodesk.com...&lt;BR /&gt;
Norman,&lt;BR /&gt;
&lt;BR /&gt;
Where did you here that !&lt;BR /&gt;
I have read many VBA and VB books and not one ever said&lt;BR /&gt;
do not use the scripting dll or file system object. Even microsoft describes &lt;BR /&gt;
how it easier to use the file system object&lt;BR /&gt;
than VBA file handling functions.&lt;BR /&gt;
&lt;BR /&gt;
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnofftalk/html/office09072000.asp&lt;BR /&gt;
&lt;BR /&gt;
Yes VBA does have a filecopy which performs the same function as a File &lt;BR /&gt;
System object copyFile.&lt;BR /&gt;
&lt;BR /&gt;
But to say that "VBA intrinsic file handling&lt;BR /&gt;
 functions can do everything Scripting.FileObject does"&lt;BR /&gt;
&lt;BR /&gt;
That is just not a true statement see attached file.&lt;BR /&gt;
&lt;BR /&gt;
Maximo&lt;/MAXIMA10&gt;</description>
      <pubDate>Sun, 22 Jan 2006 16:25:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536435#M37434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-01-22T16:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: copyFile not recognize</title>
      <link>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536436#M37435</link>
      <description>I also heard the sky is falling but  I could not remember all the arguments on this either. If you search the internet it was mentioned somewhere on the internet. That is why I am keeping my head in the ground&lt;BR /&gt;
&lt;BR /&gt;
Regards</description>
      <pubDate>Sun, 22 Jan 2006 23:22:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/copyfile-not-recognize/m-p/1536436#M37435</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-01-22T23:22:16Z</dc:date>
    </item>
  </channel>
</rss>

