C$COPY creates an exact duplicate of SOURCE-FILE in DEST-FILE. The behavior of this routine is affected by the FILENAME_SPACES configuration variable.
C$COPY
C$COPYcreatesacopyofanexistingfile.
Usage
CALL"C$COPY"
USINGSOURCE-FILE,DEST-FILE,FILE-TYPE,
GIVINGCOPY-STATUS
Parameters
SOURCE-FILEPICX(n)
Containsthenameofthefiletocopy.Remotenamenotationand"@[DISPLAY]:"notationareallowedforthisparameter.
Ifthefilenameontheclientstartswithspecialdirectoryspecifiers,thethinclientattemptstolocatethosefilesin
specialWindowsdirectories.Thespecialdirectorynamesareasfollows:
Identifier
Directory
C:\DocumentsandSettings\\ApplicationData
C:\DocumentsandSettings\AllUsers\ApplicationData
C:\DocumentsandSettings\AllUsers\Documents
C:\DocumentsandSettings\\Desktop
C:\DocumentsandSettings\\LocalSettings\ApplicationData
C:\DocumentsandSettings\\MyDocuments
NotethatthesedirectoriesarenotnecessarilythesameforallversionsofWindows,andmayinfactbeonnetworkdrives.
DEST-FILEPICX(n)
Containsthedestinationfilename.Remotenamenotationand"@[DISPLAY]:"notationareallowedforthisparameter.
FILE-TYPEPICX(optional)
Indicatesthefiletype.IftheFILE-TYPEparameterissupplied,itmustbeeither"S","R","I",or"T",indicatingthat
thesourcefileisasequential,relative,indexedfile,ortextfile.Notethatthe"T"impliesthatthefileisalinesequential
file,sincecopyingrelativeorindexedfilesastextiscounter-intuitiveandwouldlikelycorruptthosetypesoffiles.
CopyingtextfilesapplieswhencopyingbetweenUNIXandWindowssystems,wheretextfileshavedifferentlineterminator
characters.
TheFILE-TYPEparametercanbeusefulincaseswheretheoriginalfileisheldinmorethanonephysicaldiskfile(forexample,
C-ISAMindexedfilesarephysicallyheldintwoseparatefiles).IftheFILE-TYPEparameterisomitted,thenonlythesingle
physicalfilenamedinSOURCE-FILEiscopied.
COPY-STATUSAnynumerictype
Returnszeroifsuccessful,ornon-zeroifnot.Currently,anunsuccessfulstatuscodeisalways
1,butfutureversionsmayreturnadditionalinformation.
Description
C$COPYcreatesanexactduplicateofSOURCE-FILEinDEST-FILE.
ThebehaviorofthisroutineisaffectedbytheFILENAME_SPACESconfigurationvariable.ThevalueofFILENAME_SPACESdetermines
whetherspacesareallowedinafilename.Seetheentryfor
FILENAME_SPACESinAppendix Hformoreinformation.
Totransferfilesbetweentheapplicationhostanddisplayhostinathinclientenvironment,addtheprefix"@[DISPLAY]:"
tothenameofanysourceordestinationfilethatresidesontheclientmachine.
C$COPY"@[DISPLAY]:C:\path\file1.ext""/usr/data/file1.ext"
Tocopyfromonepathontheclienttoanother,specifythe"@[DISPLAY]:"prefixforboththeSOURCE-FILEandtheDEST-FILE.
Ifyouusethe"@[DISPLAY]:"prefix,youmaynotusetheFILE-TYPEparameter.Onlythesingle,specifiedsourcefileiscopied.
SeetheAcuConnectUser'sGuideformoreinformationaboutusingC$COPYinathinclientenvironment.
Parenttopic:GeneralSyntaxandLibraryList