scripting software to search for random files

quartz0

Member
Dec 17, 2011
43
0
0
I want to be able to search for say 50 random images from some directories in xp pro, there any scripting software that would do this ? thanks.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,839
4,820
75
If you had Cygwin, or potentially certain programs from MinGW, installed, I'd say:
Code:
sh -c "/bin/find [path] -name '*.jpg' -print | /bin/sort -R | head -50"
 

Snapshot1

Member
Dec 26, 2011
42
0
0
Late to the party as usual but maybe something like this (Windows 7):
Code:
C:\>for %i in (Monet, Notebook, Blue_Gradient) do dir /s %i.jpg /p

where Monet, Notebook, Blue_Gradient, etc. are the specific file names you are looking for.
 

Snapshot1

Member
Dec 26, 2011
42
0
0
A much more efficient solution (please excuse the previous which scans the entire directory structure for each file name):
Code:
C:\>dir /s /b /p *.jpg | findstr /i "Monet Notebook Blue_Gradient"