Batch Files

i have the following batch file that gets a csv file and puts it in folder ???????:????@192.168.??.??"how do i do the opposite,
i want to get the file from the sftp folder and put it on ""\\s-???-001\Data\?? data\?? Extracts\??
C:
CD C:\Program Files\WinSCP\
winscp.com  /command "option batch abort" "option confirm off" "open ???????:????@192.168.??.??" "cd /??" "put ""\\s-???-001\Data\?? data\?? Extracts\??\ArchivePath\ArchiveFiles\??.csv""" "EXIT"

Open in new window

aneilgAsked:
Who is Participating?
 
Steve KnightIT ConsultancyCommented:
I don't use winscp but with normal FTP you use "GET" instead of "PUT" I imagine you need to do these commands which will map a temporary drive to the UNC path you mention (obviosuly with the proper paths etc!) and then gets the specific file you mention  from /path/??.csv

@Echo off
REM Maps a temporary area to this file share
pushd "\\s-???-001\Data\?? data\?? Extracts\??\ArchivePath\ArchiveFiles"
"c:\program files\winscp\winscp.com"  /command "option batch abort" "option confirm off" "open ???????:????@192.168.??.??" "get /path/??.csv "EXIT"
popd

Steve
0
 
aneilgAuthor Commented:
partially worked
0
 
Steve KnightIT ConsultancyCommented:
So rather than offering a "B" grade and no feedback perhaps you could either give us feedback so we can work more on it, or elnighten us and others reading this in the future with what DID fix it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.