Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
FromFolder CSTRING(250)
ToFolder CSTRING(250)
TheFile STRING(256),STATIC
SomeFile FILE,DRIVER('DOS'),NAME(TheFile)
Record RECORD
F1 STRING(1)
END
END
CODE
TheFile = 'Names.DAT'
COPY(TheFile,'A:\') !Copy file to floppy
COPY('C:\AUTOEXEC.BAT','A:\AUTOEXEC.BAT') !Copy file to floppy
FromFolder = 'z:\my folder\file1.tps'
ToFolder = 'z:\backup area' !Use double quotes to handle folders with spaces
COPY(FromFolder,ToFolder)
GLOBAL embeds, Before File Declarations ::
!
! Shell File Operations
!
FO_MOVE EQUATE(0001h)
FO_COPY EQUATE(0002h)
FO_DELETE EQUATE(0003h)
FO_RENAME EQUATE(0004h)
FOF_MULTIDESTFILES EQUATE(0001h)
FOF_CONFIRMMOUSE EQUATE(0002h)
FOF_SILENT EQUATE(0004h) ! don't create progress/report
FOF_RENAMEONCOLLISION EQUATE(0008h)
FOF_NOCONFIRMATION EQUATE(0010h) ! Don't prompt the user.
! Fill in SHFILEOPSTRUCT.hNameMappings
! Must be freed using SHFreeNameMappings
FOF_WANTMAPPINGHANDLE EQUATE(0020h)
FOF_ALLOWUNDO EQUATE(0040h)
FOF_FILESONLY EQUATE(0080h) ! on *.*, do only files
FOF_SIMPLEPROGRESS EQUATE(0100h) ! means don't show names of files
! don't confirm making any needed dirs
FOF_NOCONFIRMMKDIR EQUATE(0200h)
FOF_NOERRORUI EQUATE(0400h) ! don't put up error UI
! dont copy NT file Security Attributes
FOF_NOCOPYSECURITYATTRIBS EQUATE(0800h)
FOF_NORECURSION EQUATE(1000h) ! don't recurse into directories.
! don't operate on connected elements.
FOF_NO_CONNECTED_ELEMENTS EQUATE(2000h)
! during delete operation, warn if nuking instead of recycling
! (partially overrides FOF_NOCONFIRMATION)
FOF_WANTNUKEWARNING EQUATE(4000h)
SHFILEOPgroup GROUP, TYPE
hwnd UNSIGNED
wFunc UNSIGNED
pFrom LONG
pTo LONG
fFlags USHORT
fAnyOperationsAborted LONG
hNameMappings LONG
lpszProgressTitle LONG
END
!==========================================================
GLOBAL embeds, Inside the Global Map ::
MODULE('Windows.lib')
SHFileOperation(LONG pSHFILEOPgroup), LONG, PASCAL, |
RAW, DLL,NAME('SHFileOperationA')
END
!==========================================================
Data (in Procedure) ::
SHFileOp LIKE(SHFILEOPgroup)
Source CSTRING(256)
Destination CSTRING(256)
!==========================================================
Insert this code where you want to perform the copy:
! This copies an entire directory - note the terminating <0>
Source = 'C:\TheSourceDirectory\*.*' & '<0>'
! This would copy 2 files
! The filenames are separated by <0>
! The list is terminated by <0><0>
Source = 'file1.exe<0>file2.exe<0><0>
Destination = 'C:\TheDestinationDirectory'
CLEAR(SHFileOp)
SHFileOp.hWnd = 0{PROP:Handle}
SHFileOp.wFunc = FO_COPY
SHFileOp.pFROM = ADDRESS(Source)
SHFileOp.pTo = ADDRESS(Destination)
SHFileOp.fFlags = FOF_NOCONFIRMATION + FOF_NOCONFIRMMKDIR
SHFileOperation(ADDRESS(SHFileOp))