Rita Byrne
asked on
How do I redirect output from psftp command
I created a file (contents below) via tsql stored procedure and ran it via ftp -s:
open server_ip
username
password
cd /itadmin/PostIngres/Billpa y/
verbose off
ls EUWCC* D:\Integra\BILLPAY\WORKING \ftp_file_ list.dat
quit
I need to do the same except using sftp so I downloaded putty sftp (called via psftp on command line) - however I can't redirect the out to a file on the server like in ftp "ls EUWCC* D:\Integra\BILLPAY\WORKING \ftp_file_ list.dat" and when I use ls or dir in psftp I get
drwxr-x--- 2 ftpadmin ftpadmin 0 May 17 13:31 .
drwxr-x--- 2 ftpadmin ftpadmin 0 May 15 10:11 ..
-rwxr-x--- 1 ftpadmin ftpadmin 21018 May 17 13:31 EUCO213110501.DAT
-rwxr-x--- 1 ftpadmin ftpadmin 11779 May 17 13:21 EUWEX.DAT
-rwxr-x--- 1 ftpadmin ftpadmin 0 May 15 11:43 This is wexccuser
instead of just the file names?
open server_ip
username
password
cd /itadmin/PostIngres/Billpa
verbose off
ls EUWCC* D:\Integra\BILLPAY\WORKING
quit
I need to do the same except using sftp so I downloaded putty sftp (called via psftp on command line) - however I can't redirect the out to a file on the server like in ftp "ls EUWCC* D:\Integra\BILLPAY\WORKING
drwxr-x--- 2 ftpadmin ftpadmin 0 May 17 13:31 .
drwxr-x--- 2 ftpadmin ftpadmin 0 May 15 10:11 ..
-rwxr-x--- 1 ftpadmin ftpadmin 21018 May 17 13:31 EUCO213110501.DAT
-rwxr-x--- 1 ftpadmin ftpadmin 11779 May 17 13:21 EUWEX.DAT
-rwxr-x--- 1 ftpadmin ftpadmin 0 May 15 11:43 This is wexccuser
instead of just the file names?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No not looking for a log of what happened, ls-1 is not a valid command
What I'm trying to do is get a clean listing of the files and redirect this output to a file on the my server over psftp (or some other way of connecting via sftp).
What I'm trying to do is get a clean listing of the files and redirect this output to a file on the my server over psftp (or some other way of connecting via sftp).
ASKER
not quiet what I'm after but close
Try this instead:
ls -1 EUWCC* D:\Integra\BILLPAY\WORKING