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\??
CD C:\Program Files\WinSCP\  /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

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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\"  /command "option batch abort" "option confirm off" "open ???????:????@192.168.??.??" "get /path/??.csv "EXIT"


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aneilgAuthor Commented:
partially worked
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.