General information
Category:
Coding, syntax & commands
Use Scripting.FileSystemObject to copy files
---------------------------
ofso = CreateObject("Scripting.FileSystemObject")
Local ;
cFileToCopy, ;
cDirToCopyFrom
m.cDirToCopyFrom = "C:\MYDIR\"
m.cDirToCopyTo = "C:\YOURDIR\"
m.cFileToCopy = SYS(2000, cDirToCopyFrom+'*.*')
DO WHILE !EMPTY(m.cDirToCopyFrom)
oFileHandler = ofso.GetFile(m.cDirToCopyFrom+m.cFileToCopy)
oFileHandler.Copy(m.cDirToCopyTo+m.cFileToCopy)
ENDDO
oFileHandler = .F.
ofso = .F.
-----------
Arto
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only