Ok so I figured out a solution to this problem – I had to create batch file that iterates through each of the subfolders and then calls a winscp.exe script to send only the files.
The contents of the batch file is as follows:
cd C:\test2
for /D /r %%i in (*) do (
cd %%i
"C:\Program Files\winscp556\winscp.exe" /console /script="C:\Program Files\winscp556\UploadScript.txt"
)
and the contents of the upload script are basically:
option batch on
option confirm off
open user:password@sftp.somesite.com -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx"
option transfer binary
put -filemask="|*/" *.txt>24H
close
exit
If there is a better way (PowerShell preferred) I'd love to see the example code!
Thanks,
Mark