Login | |
|
 |
Check if certain files exist in a directory, if not add... - 2/7/2008 4:21:59 AM
|
|
 |
|
| |
SunnyK
Posts: 1
Score: 0
Joined: 2/7/2008
Status: offline
|
We receive some logs on our windows box via FTP on a daily basis, in the 'logs' directory. I would like to check for missing log files and add their name to a textfile. Something like... Create C:\missingfiles_ydate.txt Check if C:\logs\abc_system1_ydate exists (if not, add this filename to C:\missingfiles_ydate.txt) Check if C:\logs\def_system1_ydate exists (if not, add this filename to C:\missingfiles_ydate.txt) Check if C:\logs\ghi_system1_ydate exists (if not, add this filename to C:\missingfiles_ydate.txt) Check if C:\logs\abc_systemx5_ydate exists (if not, add this filename to C:\missingfiles_ydate.txt) Check if C:\logs\def_systemx5_ydate exists (if not, add this filename to C:\missingfiles_ydate.txt) Check if C:\logs\ghi_systemx5_ydate exists (if not, add this filename to C:\missingfiles_ydate.txt) Check if C:\logs\abc_system6_ydate exists (if not, add this filename to C:\missingfiles_ydate.txt) Check if C:\logs\def_system6_ydate exists (if not, add this filename to C:\missingfiles_ydate.txt) Check if C:\logs\ghi_system6_ydate exists (if not, add this filename to C:\missingfiles_ydate.txt) Close C:\missingfiles_ydate.txt Some other details: 1. I need to use ydate (currentdate-1), and the date format is YYMMDD (e.g. 080207) 2. The VBScript should check directory C:\logs for the above files, and appends missing filenames to C:\missingfiles_ydate.txt Many Thanks, SunnyK
|
|
| |
|
|
|
|
|