FOPE SFTP uploads need to be sent to sftp.frontbridge.com on port 22

An easy way to automate this is through the use of pscp which you can find here http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html 

The syntax for a command line upload should look something like this

pscp -sftp -P 22 -pw "*********" c:\temp\sftp\users.txt org*******@sftp.frontbridge.com:/users.txt

Make sure you use quotes around the password. You will also have to substitute your password and org# where the *'s are. Depending on the size of the file you should see a corresponding line afterwards like

users.txt                 | 0 kB |   0.3 kB/s | ETA: 00:00:00 | 100%

Which indiicates the upload that occurs followed by a return to the command prompt.  Given the following line you can throw that in Task Scheduler as an item that you need to run at whatever schedule you dictate.

(Edited this to change users.csv to users.txt, because according to http://technet.microsoft.com/en-us/library/ff715124.aspx , they must end in .txt)



If you're using a Linux server, you can automate your upload using SFTP and Expect:

<code>
#!/usr/bin/expect
eval spawn sftp org********@sftp.frontbridge.com
#use correct prompt
expect "org********@sftp.frontbridge.com's password"
send "MyPassword\r"
expect "sftp>"
send "put /path/to/users.txt\r"
expect "sftp>"
send "quit\r"
</code>



You can create a second script to get a file from a webserver, etc:


<code>
#!/bin/bash

FILE="/path/to/users.txt"
TEMPFILE="/path/to/temp.txt"

if [ -a $FILE ]
then
  rm $FILE
fi

wget --no-check-certificate -m -nd https://server.domain/path/to/fileCreator.jsp -O $FILE > /dev/null 2>&1

sed 's/^M//g' $FILE > $TEMPFILE && sed '/^$/d' $TEMPFILE > $FILE

if [ -a $TEMPFILE ]
then
  rm $TEMPFILE
fi
</code>


Then cron the scripts.


 Now if anyone has any good vbscript/adsi/openldap/sundirectory etc examples of something they've done in their environment to create the sftp text file that would be interesting to add onto here:) hint hint it's a wiki