Error handling 无法使用psftp忽略错误

Error handling 无法使用psftp忽略错误,error-handling,sftp,putty,mkdir,psftp,Error Handling,Sftp,Putty,Mkdir,Psftp,我希望将本地窗口上C:\Users\myuser\Downloads\SFTP文件夹中的所有文件上载到远程SFTP服务器的myfolder目录 以下是我的命令: C:\putty\psftp.exe -b C:\putty\sftp_commands.txt -l myuser -pw mypass 10.8.44.86 这是我的C:\putty\sftp\u commands.txt文件: mkdir myfolder cd myfolder lcd "C:\Users\myuser\Dow

我希望将本地窗口上
C:\Users\myuser\Downloads\SFTP
文件夹中的所有文件上载到远程SFTP服务器的
myfolder
目录

以下是我的命令:

C:\putty\psftp.exe -b C:\putty\sftp_commands.txt -l myuser -pw mypass 10.8.44.86
这是我的
C:\putty\sftp\u commands.txt
文件:

mkdir myfolder
cd myfolder
lcd "C:\Users\myuser\Downloads\SFTP"
mput "C:\Users\myuser\Downloads\SFTP\*.*"
运行该命令会出现以下权限被拒绝错误:

C:\Users\myuser\Desktop>C:\putty\psftp.exe -b C:\putty\sftp_commands.txt -l myuser -pw mypass 10.8.44.86
Using username "myuser".
Pre-authentication banner message from server:
| EFT Server Enterprise 7.3.2.8
End of banner message from server
Keyboard-interactive authentication prompts from server:
End of keyboard-interactive prompts from server
Remote working directory is /
mkdir /myfolder: permission denied
然后我决定使用psftp的
-be
参数来忽略错误。这不起作用,我在输出中看到以下错误

C:\Users\myuser\Desktop>C:\putty\psftp.exe -be C:\putty\sftp_commands.txt -l myuser -pw mypass 10.8.44.86
PuTTY Secure File Transfer (SFTP) client
Release 0.73
Usage: psftp [options] [user@]host
Options:
  -V        print version information and exit
  -pgpfp    print PGP key fingerprints and exit
  -b file   use specified batchfile
  -bc       output batchfile commands
  -be       don't stop batchfile processing if errors
  -v        show verbose messages
  -load sessname  Load settings from saved session
  -l user   connect with specified username
  -P port   connect to specified port
  -pw passw login with specified password
  -1 -2     force use of particular SSH protocol version
  -4 -6     force use of IPv4 or IPv6
  -C        enable compression
  -i key    private key file for user authentication
  -noagent  disable use of Pageant
  -agent    enable use of Pageant
  -hostkey aa:bb:cc:...
            manually specify a host key (may be repeated)
  -batch    disable all interactive prompts
  -no-sanitise-stderr  don't strip control chars from standard error
  -proxycmd command
            use 'command' as local proxy
  -sshlog file
  -sshrawlog file
            log protocol details to a file

C:\Users\myuser\Desktop>
您能告诉我我的代码有什么问题吗?

和是单独的开关。因此,它应该是:

psftp.exe -be -b C:\putty\sftp_commands.txt ...