psftp.exe从服务器获取文件并删除 [英] psftp.exe get files from the server and delete
问题描述
我使用 psftp.exe
从服务器下载文件。有一个简单的方法来删除这些文件,一旦我已经下载了他们,但离开了下一次下载时可能出现在服务器上的新的?
这是我的命令行:
pre $ ps $ ps $ ps $ p $ domain.com -i keys\private.ppk
get * .xml
编辑:我想从Linux下载文件到Windows PC。 p>
使用 psftp
来做到这一点并不容易。您将不得不解析它的输出,以查找成功下载的文件。
尽管使用WinSCP可以轻松完成此操作。只需使用 get -delete * .xml
命令完整的WinSCP脚本应该是:
open sftp ://domain.com/ -privatekey = keys\private.ppk
get -delete * .xml
exit
请参阅 WinSCP脚本介绍。
另请参阅将PSFTP脚本转换为WinSCP的指南 a>。 (我是WinSCP的作者) I'm using Here's my command line: Edit: I want to download the files from a Linux box to a Windows PC. There's no easy way to do this with Though you can do this easily with WinSCP. Just use Full WinSCP script would be: See an introduction to WinSCP scripting. See also a guide for converting PSFTP script to WinSCP. (I'm the author of WinSCP) 这篇关于psftp.exe从服务器获取文件并删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
psftp.exe
to download files from the server. Is there an easy way to delete these files once I have downloaded them but leave the new ones that might have appeared on the server when I was downloading to be downloaded next time?psftp.exe domain.com -i keys\private.ppk
get *.xml
psftp
. You would have to parse its output to find files that were successfully downloaded.
get -delete *.xml
command.open sftp://domain.com/ -privatekey=keys\private.ppk
get -delete *.xml
exit