I am trying to search for files in the Unix directrory and copy them to my local Windows machine using PSFTP.
I am running the below command:
sh = CreateObject("WScript.Shell")
sh.Run "C:\PuTTY_Folder\PSFTP.EXE -b C:\PuTTY_Folder\script.txt user@host -pw password"
script.txt
file:
lcd C:\Regression
cd /b2/batch/ABCD
find . -mtime 1 -name "*_000000022_*" -type f # I want to find the files and copy them to my local windows machine.
bye
find
command isn't working with PSFTP
.
It says : unknown command find.
I think I can use mget
for copying multiple files, but not sure how to search and copy.
Please suggest.
Link to PSFTP documentation:
http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter6.html
I was finally able to get this thing working.
With
createScriptFile
, i am creating a.txt
file at runtime which is being used by PSFTP to transfer files.