10-17-2014, 08:06 AM
quick and dirty, need tweaks and checking tests but should help out of the box
Macro Macro20
Hope you'll find useful....
Macro Macro20
str s=
;ID=11059 l Title=American Eagle.jpg
;ID=11019 l Title=American Eagle.jpg
;ID=10119 l Title=American Eagle.jpg
;ID=12285 l Title=Kingdoms.jpg
;ID=12059 l Title=American Eagle.jpg
;ID=12085 l Title=Three Kingdoms.jpg
;ID=10059 l Title=American Eagle.jpg
;ID=23501 l Title=American Eagle.jpg
;input for pattern to search for
str name
int ok=inp(name "Word to find" "Word to find")
;where to search
str location
BrowseForFolder(&location "" 5)
;enum files
ARRAY(str) a
GetFilesInFolder a location "*.jpg" 0
;get jpg files
ARRAY(str) b
for _i 0 a.len
,if(find(a[_i] name 0 1)!=-1)
,,b[]=a[_i]
;create folder named by searched word
if(b.len)
,_s.from(location "\" name)
,mkdir _s
;move files matching pattern
for _i 0 b.len
,ren b[_i] _s
Hope you'll find useful....