ScoobyNet.com - Subaru Enthusiast Forum

ScoobyNet.com - Subaru Enthusiast Forum (https://www.scoobynet.com/)
-   Computer & Technology Related (https://www.scoobynet.com/computer-and-technology-related-34/)
-   -   Automated ftp? (https://www.scoobynet.com/computer-and-technology-related-34/206939-automated-ftp.html)

Carl Harvey 08 May 2003 12:38 PM

Just got a small access job that needs doing every day for the next 3 months before 7.00 each morning!!!

The files are on a ftp site and need retrieving and putting back once work is completed. The work bit is automated within access.

I know I could set the alarm clock!!! but there must be an easier way.

Anyone know of a way of automating the ftp file transfers?

Stueyb 08 May 2003 04:16 PM

you can force ftp to do it via the command ftp -s infile

Basically it will run the file in a script fashion so just write in the script whatever you need to do (not forgetting to logon etc) and run it with this command. If you want to be really clever you can even schedule it with an at command under nt/w2k

GaryK 08 May 2003 04:47 PM

We use something called PyroBatchFTP which lets you script the transfer so you can do 2-way syncs. if need be, and comes with its own scheduler as well.

That'll do the job!

Gary

Carl Harvey 09 May 2003 11:03 AM

what about the ftp.exe included within windows?

Anyone know where I can get some information about it.

judgejules 09 May 2003 12:39 PM

Stueyb's answer highlights this, try ftp -h in a console window to view its help.

~Jules

ragnarock2 09 May 2003 01:36 PM

Create a script file in notepad with lines as follows (assuming username is mark, and password is test):
mark
test
get /home/mark/test
bye

Save the script;

Then create a schedule task for ftp.exe (to run when you like), open the advance options, and after ftp.exe put -s:scriptnameabove hostname) i.e. assuming hostname of test, and script name of test.script:
ftp.exe -s:test.script test

ChrisB 09 May 2003 01:40 PM

We use this script with FTP.exe and Task Scheduler for grabbing NAI virus updates:

open ftp.nai.com
anonymous
anonymous@anonymous.net
prompt off
bin
cd /pub/antivirus/datfiles/4.x/
mget *.zip
mget update.ini
quit

It's called from a batch file:

Cd\Source
Cd Anti-virus
Cd NAI
Cd DATUpdates
Del update.ini
ftp -s:sdat_ftp_cmds.txt

Carl Harvey 12 May 2003 10:20 AM

Many thanks, nearly sorted.

I', using scheduler to run the script for ftp.exe and to run the access program automatically.

Unfortunately I now need to download a .csv file from a webpage. The problem is that it is generated when you visit the page and I have to right click and save as. The page generation can take a couple of minutes.

Any ideas how I can automate this???

stevem2k 12 May 2003 10:21 AM

can you hit the page with a command line browser like lynx to generate the file ?


Steve

judgejules 05 August 2003 12:41 PM

http://www.netload.com.au/

Pukka app, use it at work to collate log files from web servers. Loads of settings, including automation. Set it to run using AT or scheduler and you're sorted. Make sure you set it up right before you accidentally delete your live database ;)

~Jules

Edited to say: It does do downloads as well as uploads, just doesnt say that on the home page of the site.

[Edited by judgejules - 5/8/2003 12:42:06 PM]


All times are GMT +1. The time now is 07:32 PM.


© 2024 MH Sub I, LLC dba Internet Brands