Re: Finding if a file does not exist

Tech-Archive recommends: Fix windows errors by optimizing your registry



> Please post a short list of actual filenames and then explain in more
> detail how you want the script to react to the list.

These are the actual filenames I need to look for:

xxx_ACCOUNT_INFO.20050824_015000.INPUT
xxx_ACCTSTSCHG_CDR.20050824_045520.INPUT
xxx_ADJ_CDR.20050824_045103.INPUT
xxx_CALL_DTL_CDR.20050824_030001.INPUT
xxx_CHARGE_CODE_INFO.20050824_045454.INPUT
xxx_RCRCHRG_CDR.20050824_045259.INPUT
xxx_VOUCHER_INFO.20050824_045648.INPUT
xxx_VP_RELOAD_CDR.20050824_045147.INPUT

For the first file, for example, it ends with "015000.INPUT". The "015000"
part is variable, and I can never know ahead of time what it will be, but I
know for sure that file with start with the string
"xxx_ACCOUNT_INFO.20050824_".

I need to create a script that builds this filename (or at least builds the
part "xxx_ACCOUNT_INFO.20050824_", which I know how to do already), and then
checks to see if the file exists (actually if it doesn't exist) starting
with this same string in the filename in a specified directory.

Since I only know for sure that the file starts with a certain string, I
don't know how to extend that to make sure I'm just looking for an existing
file that matches the string I know.

Hope that's clearer...

Marco



.



Relevant Pages