uploading directories via SFTP

Hello All,

Is there a way to upload whole directories to a machine using sftp (scp is not an option)? I have to use sftp because the machine that I am connecting to only has SFTP abilities (uploading from a linux box to a windows box).

Currently I am automating a copy however right now I am just copying all the files in a directory. Copying the entire directory would eliminate me having to parse the data files into appropriate directories on the windows side. Right now I use the put command to execute the file upload and I dont know if there is a recursive flag I could use to get the job done.

Thanks in advance for the help.

So I guess my sort question is, does anyone know a way to implement recursion when utilizing sftp to upload files to a remote machine?

i usually compress files before I s/ftp them to save time during transfer then uncompress on the other end. I have done that from a UNIX server to a Win2k server before and it works fine. You just need to use a compression format that Windows can uncompress.

Other option would be to create a batch file before running the sftp command and give it that. maybe output ls -R to a file then format the file and use it.