WinSCP 系统找不到指定的路径
WinSCP The system cannot find the path specified
上下文: 我每天使用 WinSCP 将 2 个报告文件从 D:\ 驱动器上的本地目录传输到客户端远程服务器。我不断提出错误 系统找不到指定的路径 我真的不知道为什么会这样。
我已经检查了这两个文件的目录,并且在文件资源管理器中搜索时写入的确切目录可以正确访问这些文件。在测试期间的几天里,我确实更改了文件名,但又将它们改回了之前使用的名称。
我认为这可能是缓存的问题,所以我手动登录并清除了 WinSCP 目录缓存。但这并没有解决问题。
问题:
我怎样才能解决这个问题让 WinSCP 找到正确的目录?问题是否可能是默认本地目录设置为 C:\ 驱动器?也许我需要使用 UNC 命名约定或需要在目录路径中包含本地服务器名称?请指教。
再次,我检查了文件资源管理器中的目录 D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items 并打开了确切的文件,所以我确定这个目录是正确的.以下是其中一次传输尝试的 WinSCP 日志的详细信息。
. 2019-09-06 21:59:40.429 Access granted
. 2019-09-06 21:59:40.429 Opening session as main channel
. 2019-09-06 21:59:40.496 Opened main channel
. 2019-09-06 21:59:40.629 Started a shell/command
. 2019-09-06 21:59:40.629 --------------------------------------------------------------------------
. 2019-09-06 21:59:40.629 Using SFTP protocol.
. 2019-09-06 21:59:40.630 Doing startup conversation with host.
> 2019-09-06 21:59:40.630 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2019-09-06 21:59:40.821 Type: SSH_FXP_VERSION, Size: 95, Number: -1
. 2019-09-06 21:59:40.821 SFTP version 3 negotiated.
. 2019-09-06 21:59:40.821 Unknown server extension posix-rename@openssh.com="1"
. 2019-09-06 21:59:40.821 Supports statvfs@openssh.com extension version "2"
. 2019-09-06 21:59:40.821 Unknown server extension fstatvfs@openssh.com="2"
. 2019-09-06 21:59:40.821 We believe the server has signed timestamps bug
. 2019-09-06 21:59:40.821 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 strings are not mandatory
. 2019-09-06 21:59:40.821 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2019-09-06 21:59:40.821 Getting current directory name.
. 2019-09-06 21:59:40.821 Getting real path for '.'
> 2019-09-06 21:59:40.821 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2019-09-06 21:59:40.888 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2019-09-06 21:59:40.888 Real path is '/'
. 2019-09-06 21:59:40.888 Startup conversation with host finished.
< 2019-09-06 21:59:40.888 Script: Active session: [1] REDACTED
> 2019-09-06 21:59:40.888 Script: synchronize remote D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items /upload/bics_inventory
< 2019-09-06 21:59:40.888 Script: Comparing...
. 2019-09-06 21:59:40.888 Collecting synchronization list for local directory 'D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items' and remote directory '/upload/bics_inventory', mode = Remote, params = 0x2 (NoConfirmation), file mask = ''
* 2019-09-06 21:59:40.889 (EOSExtException) Error retrieving file list for "D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items\*.*".
* 2019-09-06 21:59:40.889 System Error. Code: 3.
* 2019-09-06 21:59:40.889 The system cannot find the path specified
. 2019-09-06 21:59:40.889 Asking user:
. 2019-09-06 21:59:40.889 Error listing directory 'D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items'. ("Error retrieving file list for ""D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items\*.*"".","System Error. Code: 3.","The system cannot find the path specified")
< 2019-09-06 21:59:40.889 Script: Error listing directory 'D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items'.
< 2019-09-06 21:59:40.889 Script: Error retrieving file list for "D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items\*.*".
< 2019-09-06 21:59:40.889 System Error. Code: 3.
< 2019-09-06 21:59:40.889 The system cannot find the path specified
< 2019-09-06 21:59:40.889 Script: Error listing directory 'D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items'.
< 2019-09-06 21:59:40.889 Error retrieving file list for "D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items\*.*".
< 2019-09-06 21:59:40.889 System Error. Code: 3.
< 2019-09-06 21:59:40.889 The system cannot find the path specified
. 2019-09-06 21:59:40.889 Script: Failed
. 2019-09-06 21:59:40.889 Script: Exit code: 1
. 2019-09-06 21:59:40.889 Closing connection.
. 2019-09-06 21:59:40.889 Sending special code: 12
. 2019-09-06 21:59:40.889 Sent EOF message
好的,看来我解决了问题。设置包含实际文件名的文件路径似乎过于精细。
我需要将目录设置为文件所在文件夹的位置(例如:D:\Div32_Daily_Reports\BICS_Inventory_New_Items),然后传输成功。
上下文: 我每天使用 WinSCP 将 2 个报告文件从 D:\ 驱动器上的本地目录传输到客户端远程服务器。我不断提出错误 系统找不到指定的路径 我真的不知道为什么会这样。
我已经检查了这两个文件的目录,并且在文件资源管理器中搜索时写入的确切目录可以正确访问这些文件。在测试期间的几天里,我确实更改了文件名,但又将它们改回了之前使用的名称。
我认为这可能是缓存的问题,所以我手动登录并清除了 WinSCP 目录缓存。但这并没有解决问题。
问题: 我怎样才能解决这个问题让 WinSCP 找到正确的目录?问题是否可能是默认本地目录设置为 C:\ 驱动器?也许我需要使用 UNC 命名约定或需要在目录路径中包含本地服务器名称?请指教。
再次,我检查了文件资源管理器中的目录 D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items 并打开了确切的文件,所以我确定这个目录是正确的.以下是其中一次传输尝试的 WinSCP 日志的详细信息。
. 2019-09-06 21:59:40.429 Access granted
. 2019-09-06 21:59:40.429 Opening session as main channel
. 2019-09-06 21:59:40.496 Opened main channel
. 2019-09-06 21:59:40.629 Started a shell/command
. 2019-09-06 21:59:40.629 --------------------------------------------------------------------------
. 2019-09-06 21:59:40.629 Using SFTP protocol.
. 2019-09-06 21:59:40.630 Doing startup conversation with host.
> 2019-09-06 21:59:40.630 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2019-09-06 21:59:40.821 Type: SSH_FXP_VERSION, Size: 95, Number: -1
. 2019-09-06 21:59:40.821 SFTP version 3 negotiated.
. 2019-09-06 21:59:40.821 Unknown server extension posix-rename@openssh.com="1"
. 2019-09-06 21:59:40.821 Supports statvfs@openssh.com extension version "2"
. 2019-09-06 21:59:40.821 Unknown server extension fstatvfs@openssh.com="2"
. 2019-09-06 21:59:40.821 We believe the server has signed timestamps bug
. 2019-09-06 21:59:40.821 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 strings are not mandatory
. 2019-09-06 21:59:40.821 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2019-09-06 21:59:40.821 Getting current directory name.
. 2019-09-06 21:59:40.821 Getting real path for '.'
> 2019-09-06 21:59:40.821 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2019-09-06 21:59:40.888 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2019-09-06 21:59:40.888 Real path is '/'
. 2019-09-06 21:59:40.888 Startup conversation with host finished.
< 2019-09-06 21:59:40.888 Script: Active session: [1] REDACTED
> 2019-09-06 21:59:40.888 Script: synchronize remote D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items /upload/bics_inventory
< 2019-09-06 21:59:40.888 Script: Comparing...
. 2019-09-06 21:59:40.888 Collecting synchronization list for local directory 'D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items' and remote directory '/upload/bics_inventory', mode = Remote, params = 0x2 (NoConfirmation), file mask = ''
* 2019-09-06 21:59:40.889 (EOSExtException) Error retrieving file list for "D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items\*.*".
* 2019-09-06 21:59:40.889 System Error. Code: 3.
* 2019-09-06 21:59:40.889 The system cannot find the path specified
. 2019-09-06 21:59:40.889 Asking user:
. 2019-09-06 21:59:40.889 Error listing directory 'D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items'. ("Error retrieving file list for ""D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items\*.*"".","System Error. Code: 3.","The system cannot find the path specified")
< 2019-09-06 21:59:40.889 Script: Error listing directory 'D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items'.
< 2019-09-06 21:59:40.889 Script: Error retrieving file list for "D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items\*.*".
< 2019-09-06 21:59:40.889 System Error. Code: 3.
< 2019-09-06 21:59:40.889 The system cannot find the path specified
< 2019-09-06 21:59:40.889 Script: Error listing directory 'D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items'.
< 2019-09-06 21:59:40.889 Error retrieving file list for "D:\Div32_Daily_Reports\BICS_Inventory_New_Items\BICS_Inventory_New_Items\*.*".
< 2019-09-06 21:59:40.889 System Error. Code: 3.
< 2019-09-06 21:59:40.889 The system cannot find the path specified
. 2019-09-06 21:59:40.889 Script: Failed
. 2019-09-06 21:59:40.889 Script: Exit code: 1
. 2019-09-06 21:59:40.889 Closing connection.
. 2019-09-06 21:59:40.889 Sending special code: 12
. 2019-09-06 21:59:40.889 Sent EOF message
好的,看来我解决了问题。设置包含实际文件名的文件路径似乎过于精细。
我需要将目录设置为文件所在文件夹的位置(例如:D:\Div32_Daily_Reports\BICS_Inventory_New_Items),然后传输成功。