The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-09-2008
leimrod leimrod is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 2
Question Help needed with automated FTP script

Hi,

Ok, i'm trying to automate sending a DB backup from a linux box to a remote Windows PC via FTP. I can connect, send the file and create a folder, however I require that the backups be differentiated by date. Here is what my script looks like:

Code:
open *.*.*.*
user username password
lcd /location/of/DB/backup
mkdir %Y/%m/%d
cd %Y/%m/%d
put test.txt
bye
quit
This does not work, its just creates a folder named "%Y" with a folder inside it called "%m" with a "%d" folder inside that.

How would I go about creating folders with the date structure above on a the remote windows machine? All advice and help appreciated.