Question
February 7, 2008 at 04:44 AM
v2.kumar

Check if certain files exist in a directory, if not add name to a textfile

by v2.kumar . Updated 18 years, 9 months ago

We recieve some logs on our windows box via FTP on a daily basis, in the same directory. I would like to check for missing logs files and add their name to a text file.

Something like…

Check if C:\logs\file1_currentdate exists (if not, add file1_currentdate to C:\missingfiles_currentdate.txt)

Check if C:\logs\file_currentdate exists (if not, add file1_currentdate to C:\missingfiles_currentdate.txt)

Check if C:\logs\file3_currentdate exists (if not, add file1_currentdate to C:\missingfiles_currentdate.txt)

Note: currentdate above is a variable for current date

It would be great if the above task can be accomplished through a batch file. However other alternatives as welcome as well.

Many Thanks,
SunnyK

This discussion is locked

All Comments