|
Thanks, I will use PSFTP instead of PSCP.
I have few questions if i use PSFTP
I am using the below syntax to connect to server,
psftp.exe -l testlogin -pw testpassword -b script.bat host.name.net
all my file movement code in script.bat
script.bat contains:
cd SERVER/GETFILE
lcd C:\INBOUND
get Test one.txt
quit
1. How to get latest file from the server, example i am using test one.txt
2. How to get return codes from the script.bat
3. How to rename file name "Test one.txt" to "YYYYMMDDHHDDSS.txt" when GET
4. How to rename file name "YYYYMMDDHHMMSS.txt" to "Test one.txt" when PUT
Can you please clear my questions i can do all these using PSCP but, when i use code in the script.bat it doesn't recognizes keywords like "@ echo off" "IF" "SET etc.
If i have a way to delete file using PSCP, or any idea to delete that file from server from the same script program i dont have to change all the code again.
--
Thanks
Mohan
|