- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Microsoft
- >
- Batch file to Get New Files Only through FTP
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-23-2009 11:48 PM
тАО03-23-2009 11:48 PM
Batch file to Get New Files Only through FTP
I want to create a batch file which Get (mget) the newly added Files only, from specific directory on UNIX server to local folder on windows server using FTP, and this batch file will be scheduled on the windows server to run daily to load the new files.
help me plz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-24-2009 01:30 AM
тАО03-24-2009 01:30 AM
Re: Batch file to Get New Files Only through FTP
i have some indirect solusion for this.
share out that specific directory in hpux (using by samba)map that drive in your windows box and then use robocopy with below option, robocopy will only copy diff files.
robocopy w:\ g:\ /E /SEC /LOG:Log1.log
here g= is your unix drive
w: = is your local windows drive
Log1.log is log file which will generate
let me know how it goes,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-24-2009 02:41 AM
тАО03-24-2009 02:41 AM
Re: Batch file to Get New Files Only through FTP
There is an example of ftp batch scripting in this link:
http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1237891232149+28353475&threadId=36861
You can put any command you want before the EOF put get, any ftp command.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-24-2009 04:14 AM
тАО03-24-2009 04:14 AM
Re: Batch file to Get New Files Only through FTP
I have reached the following
1- The following is the batch file which has the name "ftp_executable.bat". it contains the following:
ftp -n -s:ftp_import.txt 10.32.253.73
exit
2- The following is the text file which has the name "ftp_import.txt". it contains the following:
user
lcd D:\The coming files from FTP
cd /home/the outgoning files from ftp
prompt
mget *.CSV
bye
Everything is running well
But still I want to modify this batch to get only the newly added CSV file, not all the files (*.CSV). this is now my only issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-24-2009 05:09 AM
тАО03-24-2009 05:09 AM
Re: Batch file to Get New Files Only through FTP
then you might do better asking about it in
a Microsoft Windows forum.
> [...] only the newly added CSV file [...]
You could try to get a long-format listing
from the FTP server ("dir"?), then extract a
list of the files which meet your selection
criteria, and finally fetch the desired
files.
I don't see how you would be able to make
this work using "mget". One "get" command
per file would seem to be needed.
It might be easier if some of the work were
done on the Unix (not a well-defined term, by
the way) side. One might, for example,
create a new directory every day, and fill it
with the day's new files (or links to them).
Then, a simple FTP get-everything script
could do the job.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-24-2009 06:21 AM
тАО03-24-2009 06:21 AM
Re: Batch file to Get New Files Only through FTP
while doing such w/ ftp is possible, its going to take scripting, in your case on the windows side.