ComAcceptFileProgram

Prev Next Home Home Table Of Contents Index

ComAcceptFileProgram

ComAcceptFileProgram is a variable that contains a procedure that you use when receiving a file to determine if the file name being sent is acceptable. You procedure needs to return a True to accept the name or a False to reject the name.


Example:
ComAcceptFileProgram = Loc MyAcceptName

;- Always overwrite file

Procedure MyAcceptName if ExistFile ComFullFileName DelFile ComFullFileName endif Return True EndProc

;----- Ask to overwrite existing file

Procedure MyAcceptName var Ch if ExistFile ComFullFileName DoubleLineBox BoxBorderColor LCyan Mag BoxInsideColor Yellow Mag InverseColor Yellow Red DrawBox 31 7 47 3 UseArrows Off Write ' File ' ComFileName ' exists. Replace it? (Y/n) ' Ch = UpperCase(ReadKey) EraseTopWindow if Ch = 'N' Return False else DelFile ComFullFileName Return True endif endif Return True EndProc

See Also: ComFileName ComFullFileName

Category: Modem

Prev Next Home Home Table Of Contents Index

Sponsors
Shopping
Forum
Forum
email
EMail
Index
Index
Home
Home