I have a spent a day with Google trying to figure this one out and have decided its time to ask the experts...
I'm running OS X 10.6
I need to use cURL to FTP a file.
I have been successful send the file from the command line when I know the filename. My problem is that the filename changes with the date everyday and I need to make a bash script that is dynamic to either the date or the file contained in a folder. I will be running this script hourly.
The approach I am attempting is to set the name of the file contained in the folder into a variable and then placing that variable into the curl command.
I am sure my attempt is full of errors involving quotes, spaces, ect. and I greatly appreciate any help.
Thanks,
Drew
#/bin/bash
LOCALFILE= find /Volumes/OS/Directory/*
curl -T $LOCALFILE ftp://123.123.123.123/remotedirectory/ --user username:password