It is possible, but you will need an SFTP client such as
PSFTP.
As you are using a different program you will no longer use the file Online gave, and you will need a new command. The output will also come in a very different format. The new command is:
//run -n command.com /C echo cd [color:green]/home $chr(10) ls $chr(124) psftp
user@
host -pw
password > out.txt[/color]
Here is a sample output of the file your script will need to be able to understand:
Remote working directory is /home/user
psftp> Remote directory is now /home
psftp> Listing directory /home
drwxrwsr-x 6 root staff 4096 Sep 14 07:01 .
drwxr-xr-x 22 root root 4096 Sep 12 07:31 ..
drwx------ 12 user group 4096 Sep 15 12:08 user
psftp> quit