Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Limiting Folder Depth in Enumerate Files
#1
I look for a series of different wildcarded filesnames in a directory tree using foreach command as below. I have used the size delimiter to get only one file per seriesname. The only problem is that it takes way too long since the files are are in one of two subfolders one level down. However in each of those subfolders there is one folder that has many many more levels and large files that have to be sifted through for each member of the foreach sequence. If I could limit the enumerate files to just one level down, I think this would be very quick. Any ideas?

Thanks,
Stuart

Code:
Copy      Help
str testdir
BrowseForFolder(testdir "R:\Serono1\IMAGES\4_Images To Be Read")



str seriesname=
*re*air*
*re*ost*ad*
*re*re*ad*
*re*T2*
*24*air*
*24*ost*ad*
*24*re*ad*
*24*T2*

str testfile


foreach testfile seriesname
    str testfullpath.format("''%s%s''" testdir testfile)
    Dir d
    foreach(d testfullpath FE_Dir 0x4)
        str sPath=d.FileName(1)
            out sPath
        int sizer=d.FileSize
        if sizer>100000
            cop- sPath "C:\Documents and Settings\All Users\Desktop\Cheshire Launch Pad"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)