我们有一个服务器,另一个脚本 sFTPs 和每天下载文件。
问题:是否可以检测到文件已下载,然后在下载完成后让我自动存档文件?
澄清一下 - 我们托管文件,其他人来下载它。
这是他们使用的脚本:
let $command = 'sftp -b /usr/tmp/file.sftp someuser@myserver'
show 'FTP command is ' $command
call system using $command #status
##file.sftp##
# Set local directory on PeopleSoft server
lcd /var/tmp
# Set remote directory on the remote server
cd ar/in
# Transfer all remote files to PeopleSoft
get file.dat
get file2.dat
# quit the session
bye
Run Code Online (Sandbox Code Playgroud)