I am doing a directory scan of a user’s folder looking for the following file, which has the date imbedded in the file name. I want to just look at files with today’s date. Am I using the split command wrong? Because the results of this script is _36_13.nbf, the last 10 characters of the file name and not the last 10 characters from the @ left.

C:\>kix32 FileDate.kix $FN="diagindex_TS-CTXFIA01_2005_05_26@07_36_13.nbf"

Code:

$sArray = Split ($FN,"@")
$x = Right ($sArray[0], 10)
? $x