JDBC Driver for SFTP

Build 25.0.9434

RenameFile

Renames a file on the remote SFTP server without altering its contents or location.

Renaming Files

SFTP allows only a small subset of columns to be used in the EXEC query. These columns can typically be used with only = comparison. The available columns for RenameFile are RemoteFile and NewFileName. For example:

EXECUTE RenameFile RemoteFile = '/home/test/CDataTest/SPTest/TestFile.txt', NewFileName = 'TestFileNew.txt'

Input

Name Type Required Description
RemoteFile String True The full path and current name of the file on the FTP/SFTP server that should be renamed.
NewFileName String True The new name for the file on the FTP/SFTP server, which remains in the same directory.

Result Set Columns

Name Type Description
Success String Indicates whether the rename operation completed successfully (true) or unsuccessfully (false).

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434