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.
\\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.