Windows XP search for files which have specfic name length

2

I want to look for all .txt files in a folder, which their filename starts with r and is 4 character length or lower (<=4)

What's the query? (in Windows XP)

kikio

Posted 2013-05-03T17:53:19.027

Reputation: 325

1I'm guessing that powershell is not allowed since it is homework? – EBGreen – 2013-05-03T17:56:07.413

Answers

0

r???.txt will work. The question marks represent each character so it will match all txt files starting with r with up to 4 characters.

OR

PowerShell
get-childitem c:\ -r r*.txt |? {$.GetType().Name -match "File" } |? {$.basename.length -le 5} | %{$_.name}

Travis

Posted 2013-05-03T17:53:19.027

Reputation: 1 044