Previous Posts


Install Windows 2003 Recovery Console

Get ready for Windows 2008

Vulnerability in Virtual PC

Backup and Restore Outlook 2003 auto complete data...

Force Windows Activation Dialog to Show

Encrypt your files the free and easy way

Free New Zealand Daylight saving patch released fo...

Windows Vista SP1 beta to be released soon

Try out Windows 2008

Daylight Saving Time Patch - New Zealand Update



Archives

May 2005

January 2006

April 2006

May 2006

June 2006

July 2006

September 2006

October 2006

November 2006

December 2006

January 2007

February 2007

March 2007

April 2007

May 2007

June 2007

July 2007

August 2007

September 2007

October 2007

November 2007

December 2007

January 2008

February 2008

March 2008

April 2008

May 2008



Subscribe to our Feed:






FTP Files Automatically

I have a backup log that I create every night...on three different servers. They are all separated by many miles across the Internet. I wanted to find an easy way to send them all to one central location, but at the same time I did not want to have any extra software to do it.

The key requirement of not needing additional software meant that I would need to script FTP in some way.

After playing around with it at the command line, I discovered the -s option. It allows you to feed it a file that it will use to play back ftp commands.

Lets look at what I need to do to send this file

1. Connect to the host (ftp.somesite.com)

2. Send the username and password (administrator/Password1997)

3. Send the file (c:\logs\backups.log)

4. Disconnect

In FTP commands this converts to:

open ftp.somesite.com
administrator
Password1997
bin
put c:\Logs\Backup.log
quit


the bin command makes sure that ftp does not try to do any text conversions with the file.

Save the script to a file (In my case I called it FtpScript.txt)

FTP Automatically Backup


Now if we call it at the command line it will automatically upload the file

(ftp -s:FtpScript.txt)

FTP Automatically Backup Script


Now I can schedule it to run every night, and the backup logs are uploaded automatically.


Posted By: Steve Wiseman on Monday, September 10, 2007

Check out our utilities for windows

 



Copyright © IntelliAdmin, LLC, 2008. All Rights Reserved