| 1. |
Solve : Batch file to find newly updated file in FTP Server? |
|
Answer» HI, 1. Daily it need to search for any new files are folder added, If so it has to be downloaded to my local machine. How do you recognize a new file or folder? Date? Time? What happens to files or folder that are downloaded? Do they get deleted from the server, moved elsewhere on the server? Quote 3. Is there any possible to use GMail SMTP settings and send a mail using batch script. If we find any new files that details has to be mailed to the particular users to download. If you have a GMAIL account you can use the Google SMTP server. Click here. You will probably need to write a Windows script using the CDO.Message object. For batch scripts, you can use Blat which requires a download. You can also use your own mail server if you have one or your ISP server. How is all this being done now? Once you can do a walk through of the procedure you're currently using, automating it should be relatively easy. Let us know. Hi, I need to find new files using date/time Regards PaulwintechThis little piece of code will filter the current files (including files in subfolders). It uses the current date for comparison: Code: [Select]echo off setlocal enabledelayedexpansion set dt=%date:~4,10% for /f "tokens=* delims=" %%i in ('dir c:\folder /a-d /s /b') do ( set fdt=%%~ti set fdt=!fdt:~0,10! if !fdt! EQU %dt% echo !fdt! %%i ) Now that you can isolate them, what happens next? Stage them in a transmission folder? Transmit each file separately? Note: My system date is in the FORMAT of dow mm/dd/yyyy. The set dt= statement in the file isolates the mm/dd/yyyy portion. You may have to tweak it for your local date format. Let us know. sidewinder, That will only work on his local machine. He needs a way to find the latest files at REMOTE. OP, This is a job for a programming language with the necessary ftp , smtp libraries, not batch. ( not saying it can't be done, but its tedious ). I recommend Python (or Perl).Hi, Is there any possible to take the updated files from share and save it in backup server, For example in Machine A and Machine B have share called mybackup. Everyday they put some of their required backup in that folder. Backup server should take or compare for any new files present in the share of A/B, and copy the same into backup server. Please let me know is there any possibility to do so. Thanks Paulwintech |
|