paramiko - How can I refresh the modified date of a file on the SFTP server automatically?
<p>I have a file on the SFTP server that should be imported with <strong>paramiko</strong> package on certain conditions. Until these conditions aren't fulfilled, this file should stay on the server unimported, but its modified date shoud be updated, so that this date should be always bigger than the time, at which file was checked by my import program. </p>

<p>I read the <a href="http://docs.paramiko.org/en/2.0/api/sftp.html" rel="nofollow">documentation</a> for the package but didn't found any function that could do this.</p>

<p>This can be done with copying the file from the SFTP to the local host, removing the file from the SFTP and copying it again to the SFTP.</p>

<p>So,</p>

<ol>
<li><code>get(remotepath, localpath, callback=None)</code></li>
<li><code>remove(path)</code></li>
<li><code>put(localpath, remotepath, callback=None, confirm=True)</code></li>
</ol>

<p>If anyone has another idea, please share your knowledge!</p>

python sftp paramiko last-modified