Copy/Move File Utility

From CometWiki

Jump to: navigation, search

CUtlCpy - a general purpose Copy/Move File Utility

Based upon the MoveFile utility provided to the Signature community by Jon Sacks, this utility will use the copyfile mnemonic to copy a file at the OS level to a folder that is specified as either a Comet alias or a pathname without the need for a QDIR in the destination folder.
The program was originally designed for use with the Report Generator and its ENTER command but is flexible enough for more general purpose use.
It works for either local systems or remote Comet Anywhere clients. The destination folder can be any folder that the user system has access to. The file is expected to be a DOS file.

The copy parameters are passed to CUtlCpy through the system buffer as a series of comma-separated values in the format of:

Source File Name,[DIR],Destination File Name,Alias or pathname,[EraseFlag],[LauchFlag],[DisplayFlag] 

Example: testfile.txt,tmp,testfile.txt,$(mydocuments),Y,Y,T

If an alias is specified as the destination and the alias does not yet exist, the user will be presented with a folder picker to choose the associated path for the alias.
CUtlCpy will create the Comet alias and proceed with the copy.

The Erase Flag if set to "y" will erase the source file after the copy completes.

The Launch Flag when set to "Y" will tell windows to launch the target file after the copy is done.

The Display Flag tells the system how to display information in the enter program,

Options are

T-Typewriter Mode (Default) 
L-CosC Startup Log 
N-No Display 
D-Display Only in Typewriter Mode but don't prompt 
W-Message Box Window for all messages 

CUtlCpy was added to the UTL release in version 8.05 and requires Comet version .393 or higher. The source is available in XTL as CUtlCpy.ibs.

Copyright © 1995 - 2008 Signature Systems, Inc.