How to FTP fiels according to generated date


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to FTP fiels according to generated date
# 1  
Old 05-03-2006
How to FTP fiels according to generated date

Hi,

I need to get some files from a server via ftp. normaly I use following scrip, it is worrking fine.

cd dir_name
ftp -v -n "10.76.170.17" << cmd
user "rbi" "rbi"
cd recordreceive
prompt
mget b*.dat
bye

Now I need to modify it to get files accodding to the generated date. Can some body give me an idea how should modify my script to do this.

Example:

I have files like this in my server(Windows) as follows,

-rwxrwxrwx 1 owner group 348734 Oct 09 2005 b00000505.dat
-rwxrwxrwx 1 owner group 348419 Oct 10 2005 b00000506.dat
-rwxrwxrwx 1 owner group 348765 Oct 11 2005 b00000507.dat
-rwxrwxrwx 1 owner group 350113 Oct 12 2005 b00000508.dat
-rwxrwxrwx 1 owner group 349624 Oct 12 2005 b00000509.dat
-rwxrwxrwx 1 owner group 349359 Oct 18 2005 b00000510.dat

How can I ftp(mget) files only generated on Oct 18 2005 ?

Waiting for answer soon

Thanks
Mahesh
Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find/searching files in subdirectories excluding the fiels in Parent Directory

Hi All, requirement is to find and remove the files from sub directories but it should exclude the files from parent directory. At present i am using the below one but it finds and remove files from both parent and sub directories. find ${PATH} -type f \( -name securitas\* -o -name \*gz... (1 Reply)
Discussion started by: Naveenkk
1 Replies

2. UNIX for Advanced & Expert Users

Script to rename file that was generated today and which starts with date

hello, can someone please suggest a script to rename a file that was generated today and filename that being generated daily starts with date, its a xml file. here is example. # find . -type f -mtime -1 ./20130529_4995733057260357019.xml # this finename should be renamed to this format.... (6 Replies)
Discussion started by: bobby320
6 Replies

3. Shell Programming and Scripting

How to replace actual generated date with sysdate?

Hi, currently I've a file with the following content: insert into CD_CARD_TYP (code, description, last_update_by, last_update_date) values ('024', '024', 2, to_date('29-03-2008 05:16:09', 'dd-mm-yyyy hh24:mi:ss')); insert into CD_CARD_TYP (code, description, last_update_by,... (1 Reply)
Discussion started by: jediwannabe
1 Replies

4. UNIX for Advanced & Expert Users

Empty lines at the end of the payload generated in FTP server

Hi All, I am facing an issue in one of the use cases that I am trying to implement. I am getting a purchase order from one of the trading partners through Oracle B2B. B2B forwards this B2BM (B2B message ) to AIAB2BInterface. From AIAB2BInterface my BPEL process gets invoked, which in turn... (1 Reply)
Discussion started by: mayank2211
1 Replies

5. UNIX for Dummies Questions & Answers

How to view date during FTP

date command does not work during FTP. how can we view the system or server date during FTP. (2 Replies)
Discussion started by: Shell_Learner
2 Replies

6. Shell Programming and Scripting

Ftp all the generated files

Hi All, I'm working on a ftp shell script in which I'm tranfering files from one sever to another using ftp. Some program generates files at undefined time & throughout the day. I have to transfer the files time to time.. i.e. once the file is generated, it should be transfered at the very... (3 Replies)
Discussion started by: im_new
3 Replies

7. Shell Programming and Scripting

Need a script to Append date to generated .txt file

Hi, Can anyone plz share their experience with - Building shell script to append the file with date in following format- Filename_MMDDYYYY.txt Thanks in advance (2 Replies)
Discussion started by: prince_of_focus
2 Replies

8. UNIX for Advanced & Expert Users

How to FTP a file generated at UNIX Box to NT Box

Hi all, I am generating a file on the Unix machine , now i want to FTP the same file to the NT machine. how can i do that and the application currently upon which i am working is a JAVA based application. I need your help. regards Ruchir (2 Replies)
Discussion started by: Ruchir
2 Replies

9. UNIX for Dummies Questions & Answers

ftp by date filter

i would be grateful if someone could supply me with a shell script which performed a ftp but only retrieved files which had a created date greater than a specific date - is this possible with ftp? many thanks mc (1 Reply)
Discussion started by: campbem
1 Replies

10. UNIX for Dummies Questions & Answers

Print Multipul Fiels as One shot

Hi there This is my first post. I just want to know the best way to print N number of files as one shot. Let's simulate the case ... > ls file1.txt file2.txt file3.txt file4.txt file5.txt What is the best way to print all this files.. what I'm doing now is / > print... (9 Replies)
Discussion started by: geoquest
9 Replies
Login or Register to Ask a Question
IO::All::FTP(3pm)					User Contributed Perl Documentation					 IO::All::FTP(3pm)

NAME
IO::All::FTP - Extends IO::All to FTP URLs SYNOPSIS
use IO::All; "hello world " > io('ftp://localhost/test/x'); # save to FTP io('ftp//example.org/pub/xyz') > io('xyz'); # GET to file # two ways of getting a file with a password: $content < io('ftp://me:secret@example.org/xyz'); $content < io('ftp://example.org/xyz')->user('me')->password('secret'); DESCRIPTION
This module extends IO::All for dealing with FTP URLs. Note that you don't need to use it explicitly, as it is autoloaded by IO::All whenever it sees something that looks like an FTP URL. METHODS
This is a subclass of IO::All::LWP. The only new method is "ftp", which can be used to create a blank IO::All::FTP object; or it can also take an FTP URL as a parameter. Note that in most cases it is simpler just to call io('ftp//example.com'), which calls the "ftp" method automatically. OPERATOR OVERLOADING
The same operators from IO::All may be used. < GETs an FTP URL; > PUTs to an FTP URL. SEE ALSO
IO::All::LWP, IO::All, LWP. AUTHORS
Ivan Tubert-Brohman <itub@cpan.org> and Brian Ingerson <ingy@cpan.org> COPYRIGHT
Copyright (c) 2007. Ivan Tubert-Brohman and Brian Ingerson. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> perl v5.10.0 2007-03-29 IO::All::FTP(3pm)