Converting FTP script to SFTP

AlHal2
AlHal2 used Ask the Experts™
on
The code below allows me to log into an FTP server decide which directory I want and delete some files.
Please could you enable it to work on an SFTP server?
Set HostName=xx
set USERID=xx
set PWD=xx
set ScriptDir=xx
set FTPSCRIPT=%ScriptDir%\$tempftp$.$$$

echo open %HOSTNAME%>%FTPSCRIPT%
echo user %USERID% %PWD%>>%FTPSCRIPT%
echo cd newdirectory\subdirectory

echo mdel *.*>>%FTPSCRIPT%


echo bye >>%FTPSCRIPT%
ftp -i -n -s:%FTPSCRIPT%

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
you can use sftp from command line:
http://winscp.net/eng/docs/commandline

Author

Commented:
Is it possible to do this without downloading any software?
standard windows ftp client can connect only to ftp... not sftp.

Author

Commented:
Thanks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial