pythonsftpparamikofsspec

Paramiko SFTP file renaming: OSError('Extended request not supported.')


I can't find anything about this exception. I am trying to rename a remote file on a local (Windows) SFTP server with fsspec. Paramiko behind the scenes is doing a posix_rename(). What does the error mean?

fs.rename(old_file_path, new_file_path)

Paths look like /folder/file.ext.

I can rename files with other FTP clients on that same server.


Solution

  • Actually, I just found that the SFTPClient is exposed through the SFTPFileSystem and I can call rename() on it directly, which worked!

    fs.ftp.rename("testfile.txt", "x")