08-01-2007, 08:09 PM
;enumerate folders in "images" folder
Dir d
foreach(d "c:\somewhere\images\*" FE_Dir 0x1)
,str sPath=d.FileName(1)
,out "Folder: %s" sPath ;;display folder path in QM output
,;enumerate gif files in these folders
,str s2.from(sPath "\*.gif")
,Dir d2
,foreach(d2 s2 FE_Dir)
,,str sPath2=d2.FileName(1)
,,out sPath2 ;;display gif file path in QM output
,,;move into folder up one level
,,;ren sPath2 sPath ;;disabled for testing. Enable this line if enumeration works well
,,
,These foreach can be inserted using the 'Enumerate Files' dialog.
