mget new files only


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers mget new files only
# 1  
Old 09-24-2009
mget new files only

Hi all,

I am currently in the process of setting up an FTP server with limited knowledge Smilie.

I have run into an issue that i need some help with.

Basically i want to be able to download files off another remote server twice a day every day but i want to make sure it only downloads new files not files i already have?

I have two scripts running, a send script and a receive script.

There are two folders on the remote side (drop) (receive), i want to download files from the receive folder that i have not received yet? Can this be done? Im using LFTP to connect to the server. Smilie

---------- Post updated at 03:47 AM ---------- Previous update was at 03:33 AM ----------

I have just been reading about a mirror command in lftp, would this be what im looking for?

If i was to put this into my script then at the end of the script do a mdelete * on the receive folder, when the next mirror runs would it see them files are missing then delete them locally to 'mirror' whats on the other side?
# 2  
Old 09-24-2009
Maybe rsync is an alternative for you since it brings more functionalities than ftp that would could handle your needs better.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

FTP mget will only grab files not folders

Hey All, first post :rolleyes: So I am writting a script to pull down files from an ftp that will be called from a bat file on windows. This seems pretty straight forward, and grabs all of the "files" in the cd location, but I am running into some permission issue that will not allow me to... (1 Reply)
Discussion started by: mpatton
1 Replies

2. UNIX for Advanced & Expert Users

Help with get/mget from FTP server with files older than 10 minutes

Hi! I am new to unix and this forum as well.. Can someone please help me : I want to "get/mget" files which are older than 10 minutes from a remote FTP server like "ftp.com". After getting the files to local unix server say "Prod.com" , i need to delete only those files from ftp.com which... (4 Replies)
Discussion started by: SravsJaya
4 Replies

3. Shell Programming and Scripting

Creating a list of files retrieved from MGET

Is there a way to create a txt file with the names of the files I retreive using mget *.file. I want to use this file as input to a delete command. Using HP-UX (3 Replies)
Discussion started by: jagf
3 Replies

4. UNIX for Dummies Questions & Answers

mget help

Hi I'm trying to get all files from a directory with a script. So i'm gone paste my script here: cd /var/www/match_demos/speedgaming/ lftp -u Gudfaren,xxxxx ftp.speedgaming.pro -e cd 89.221.243.11_27500 -e mget *.dem exit when i run that i get: "File name missed. Try `help mget' for more... (2 Replies)
Discussion started by: vYN
2 Replies

5. UNIX for Dummies Questions & Answers

Mget issue: not transferring more than 2 files

I am trying to transfer about 3000 files from a window platfrom to my linux server. the scrip is pretty simple ftp to the source server (windows) cd to source directory lcd to destination directory mget *.jpg what I get in the log file is: mget 07421001.jpg? 200 PORT command successful.... (4 Replies)
Discussion started by: Doveman
4 Replies

6. Shell Programming and Scripting

Cannot copy files using mget

I performed the following operations: - ftp - open xxx.xxx.xxx.xxx - username, password - dir 200 PORT command succesful 150 Opening ASCII mode data connection for /bin/ls I see some files and 1 directory - I digit: mget * for each file I see: mget .\nomefile? Y 200 PORT command... (9 Replies)
Discussion started by: andreac81
9 Replies

7. Shell Programming and Scripting

shell script - ftp downloading serveral files without mget

Hello guys, i'm searching for a solution how to download all files from root-directory of an ftp-server through an ftp proxy getting through the ftp proxy and download one file with get ist no problem, but mget * does nothing! ftp -n -i -v <<EOF open proxyHost proxyPort user... (19 Replies)
Discussion started by: macProgger23
19 Replies

8. Shell Programming and Scripting

mget * (obtein files from current directory but not the files form sub-directories)

Hello, Using the instruction mget (within ftp) and with "Interactive mode off", I want to get all files from directory (DirAA), but not the files in sub-directories. The files names don't follow any defined rule, so they can be just letters without (.) period Directory structure example: ... (0 Replies)
Discussion started by: Peter321
0 Replies

9. UNIX for Dummies Questions & Answers

Where are "get/mget" files stored?

From telnet, I ftped into a remote server. When using mget or get, where are the downloaded files stored? (3 Replies)
Discussion started by: yongho
3 Replies

10. UNIX for Dummies Questions & Answers

mget

hi, i want to mget a directory. how to specify the flag that i dont want the system to prompt me? thanks (2 Replies)
Discussion started by: yls177
2 Replies
Login or Register to Ask a Question