What is meaning of \\Server1\Folder1\Folder2\File.txt in WinSCP FTP script?

徘徊边缘 提交于 2019-12-08 04:18:31

问题


I have a put command which is working in SFTP for one file.

Below, I have code using FTP and I need to convert it to SFTP:

echo put \\Server1\Folder1\Folder2\File1.txt  /Folder1/Folder2/sympdayedw_%datestr%%timestr%.txt >> 
\\Server1\Folder1\Folder2\File.txt

Can anybody explain to me what the meaning of the above syntax in FTP batch script is? In my understanding File1 is copied from \\Server1\Folder1\Folder2\File1.txt to /Folder1/Folder2/sympdayedw_%datestr%%timestr%.txt, but I don't understand the meaning of \\Server1\Folder1\Folder2\File.txt.

Now I need to convert from FTP to SFTP, however, I am able to copy d:\examplefile.txt from one server to another server using SFTP using this statement:

D:\WINScp\winscp.com /ini=nul /command "open scp://remoteserverName:22/ -privatekey=""D:\Privatekey.ppk"" -hostkey=""ssh-rsa 2048 18:39:f4:7b:e9:68:41:23:a3:a9:5c:0a:a8:eg:bc:1f""" "put d:\examplefile.txt"

Thank you very much for you help.


回答1:


\\server\share\path\file.ext is UNC path syntax.

You can use UNC path in Windows in place of a local file path to refer to a file (path\file.ext) in a shared folder (share) on another machine (server) of your local network.

It has nothing to do with FTP protocol or WinSCP.



来源:https://stackoverflow.com/questions/48777459/what-is-meaning-of-server1-folder1-folder2-file-txt-in-winscp-ftp-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!