Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to make auto sorting macro
#2
Macro Macro1018
Code:
Copy      Help
str folder="Q:\test\photos"
ARRAY(str) a
GetFilesInFolder a folder "IMG_????????_??????.jpg"
if(a.len=0) out "no files"; ret
a.sort(8) ;;out a

int i
for i 0 a.len
,str& path=a[i]
,str monthN.get(path folder.len+9 2) ;;out monthN
,str month.gett("January February March April May June July August September October November December" val(monthN)-1) ;;out month
,str monthFolder=F"{folder}\{month}"
,mkdir monthFolder
,ren path monthFolder


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)