InfoConnect for Unisys
Attachmate.Reflection.Emulation.OpenSystems Namespace / IFileTransfer Interface / TransferIfFileExistsDefault Property


In This Topic
    TransferIfFileExistsDefault Property
    In This Topic
    Returns or specifies what should happen with transfers from the File Transfer dialog box if the destination file already exists.
    Syntax
    'Declaration
     
    
    Property TransferIfFileExistsDefault As DestinationFileExistsOption
    'Usage
     
    
    Dim instance As IFileTransfer
    Dim value As DestinationFileExistsOption
     
    instance.TransferIfFileExistsDefault = value
     
    value = instance.TransferIfFileExistsDefault
    DestinationFileExistsOption TransferIfFileExistsDefault {get; set;}
    Remarks

    This property is automatically set every time you perform a transfer from the File Transfer dialog box. The value used for a transfer from the File Transfer dialog box becomes the default for the next transfer from the dialog box. This property has no effect on programmatic transfers—if you don't explicitly specify an IfFileExists action when you transfer files programmatically, the transfer fails if the destination file already exists (equivalent to DestinationDestinationFileExistsOption.Cancel).

    This property affects transfers under all supported protocols. The default is DestinationDestinationFileExistsOption.AskUser.

    DestinationFileExistsOption.Append The contents of the source file are appended at the end of the destination file.

    DestinationFileExistsOption.AskUser A dialog box prompts the user to specify what should be done.

    DestinationFileExistsOption.Cancel The transfer fails.

    DestinationFileExistsOption.Delete For transfers to a host, DestinationFileExistsOption.Delete deletes both the contents of the host (destination) file and its attributes. For transfers from the host, DestinationFileExistsOption.Delete replaces the local file.

    DestinationFileExistsOption.Overwrite This value is relevant only for WRQ/Reflection transfers. Its effect is host specific: ·

    • For transfers to an HP 3000 host, DestinationFileExistsOption.Overwrite replaces the data in the destination file, but does not replace the file's attributes (characteristics). This can be a problem in overwriting a smaller file with a larger one: new records are not allocated to accommodate additional data, so only part of the file data is transferred. Use DestinationFileExistsOption.Delete to avoid this problem. ·
    • For transfers to a VMS host, DestinationFileExistsOption.Overwrite only replaces the most recent instance of the destination file. ·
    • For transfers to a UNIX host, DestinationFileExistsOption.Overwrite preserves existing symbolic links to the host file.

    DestinationFileExistsOption.Purge This option is available when you're using the WRQ/Reflection protocol, and when you're connected to a VMS host or an HP 3000 host. (With an HP 3000 host, this option is equivalent to DestinationFileExistsOption.Delete).

    If you send a PC file to a VMS host using the DestinationFileExistsOption.Purge option, existing versions of the file on the host are purged following the transfer. For example, if you send NOTES.TXT to the host, and NOTES.TXT;2 and NOTES.TXT;3 already exist, a successful transfer results in a single file on the host called NOTES.TXT;4. · When transferring to the PC, this option deletes the specified file on the PC (if it exists) and a new file is created.

    DestinationFileExistsOption.Rename Renames the file being transferred if a file of the same name already exists. The last three characters of the file's name are changed to 001. If such a file already exists, the file's name is changed to 002, and so on up to 999.

    DestinationFileExistsOption.Resume If the destination file exists, InfoConnect assumes it is there as the result of an aborted download. The file transfer is resumed at the point of interruption. This option is relevant only for Zmodem transfers.

    DestinationFileExistsOption.Skip The file is not transferred and no error is returned. This option is relevant only for WRQ/Reflection and Zmodem transfers.

    DestinationFileExistsOption.Update Transfers the file only if the source file is newer than the destination file. This option is relevant only for WRQ/Reflection transfers.

    DestinationFileExistsOption.UseRemote Uses the IfFileExists option specified by the remote system. If the remote system doesn't specify a IfFileExists option, this option is equivalent to DestinationFileExistsOption.Cancel. This option is relevant only for Zmodem transfers.

    See Also