Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. Fn_OrganizeFolder(arcFolder,days){
  2. i := 0
  3. Loop, Files, %arcFolder%
  4. {
  5. fileDte = %A_LoopFileTimeModified%
  6. EnvSub, fileDte, %A_Now%, days
  7. ; MsgBox %fileDte% %days% (IfLess, %fileDte%, %days%) %A_LoopFileName%
  8. If fileDte < %days%
  9. {
  10. Destination := "C:\Users\austi\Documents\File Cabinet\Archive\" A_LoopFileName
  11. FileMove, %A_LoopFileFullPath%, %Destination%, 1
  12. i++
  13. if (ErrorLevel != 0) {
  14. MsgBox %ErrorCount% files/folders could not be moved.
  15. }
  16. }
  17. }
  18. return i
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement