troubleshooting Question

How to split the name of the file according to month,day,year and its pattern?

Avatar of namerg
namergFlag for United States of America asked on
32 Comments1 Solution321 ViewsLast Modified:
I hope i do not get spanked.
It is something similar on this post:

I have tasks that create the following files but we do manually check their existence. Would like to automate the file checking.

The following file (2013_03_27_021208-batch.xls) has YYYY_MM_DD_whatever. We can control the year, day and month but the rest can be anything and is time  stamped today's date at 2:00am.
To do: Need to check of the existence of that file from Monday through Friday

Task 2:
The are five files:YYYYMMDD_whatever_clm.txt, YYYYMMDD_whatever_proc.txt,YYYYMMDD_whatever_pym.txt,YYYYMMDD_whatever_pymt_li.txt,YYYYMMDD_whatever_cc.txt
To Do: Need to check the existence of *_clm.txt,*_proc.txt,*_pymt.txt and *_pymt_li.txt from Monday to Friday. But, on Monday need to check the existence of the *_cc.txt

There is one file:W_UANETPX_27-MAR-2013.TXT
Constant: W_UANETPX_
Constant: .TXT
To Do: Need to check the existence of the file every day according to the pattern and DD-MONTH-YYYY

Taks 4
There is one folder: cg322701
On folder cg322701 we have to make sure the following file exist:
  UPI_YYYYMMDD.txt exists. DD = Today's date - 1 day

Hopefully this gives me enough intelligence to automate my other tasks
Join our community to see this answer!
Unlock 1 Answer and 32 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 32 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros