I am trying to print file names along with path from SFTP server to other location. I am able to get file names but not path. Below is the code that I have used:
echo "ls *.gpg" | sftp [email protected]:/SXMPMX/INBOUND/FORDCOI_CONT_RESP > $Path/sample.txt
Please let me know is there any way to solve my problem.