Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hello, new to Quick Macros. Move multiple files up one level
#2
Code:
Copy      Help
;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.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)