![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Windows & DOS: Issues & Discussions All Windows and DOS questions should go here as well. Discuss UNIX to Windows (Desktop or Server) here! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Batch file to Get New Files Only through FTP | alsharq | Windows & DOS: Issues & Discussions | 1 | 03-29-2009 01:08 PM |
| bash - batch script for extracting one file from multiple tar files | kuliksco | Shell Programming and Scripting | 4 | 11-13-2007 02:34 AM |
| Looping/Repetition in Batch files | kimpot7268 | Shell Programming and Scripting | 2 | 12-12-2005 08:45 AM |
| Schedule a Batch file to delete files at particular intervals | Indom | Windows & DOS: Issues & Discussions | 6 | 02-04-2004 12:57 PM |
| Batch files and FTP under Unix | ober5861 | UNIX for Dummies Questions & Answers | 4 | 07-16-2001 09:12 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi there
I want to create a batch file which Get (mget) the newly added Files only from specific directory on UNIX server to specific 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 (load the newly added files from the unix directory to the windows folder). Urgent help plz I have reached the following 1- The following is the batch file it contains the following: Code:
ftp -n -s:ftp_import.txt 10.32.253.73 exit user <unix username> <unix password> lcd D:\(The path of source, where to get the files from unix server) cd /home/The path of destination, where to put the files to windows server) prompt mget *.CSV bye Everything is running well But still I want to modify this batch to get only the newly added CSV files, not all the files (*.CSV). this is now my only problem. Last edited by Yogesh Sawant; 03-29-2009 at 12:57 PM.. Reason: added code tags |
|
||||
|
A variation on the approach I use may meet your needs. The first call to FTP needs to do a DIR and save the result to the local disk. The script then parses that file to identifiy what files are new. The second call to FTP downloads specific files that were identified as new. I tend to do this sort of stuff with PERL instead of a batch file. Much better control that way.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|