Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FormatTime, PrintMonth,, yyyy-MM
- MoveTo := "\\psf\Home\Desktop\Screenshots\" . PrintMonth
- FileMove \\psf\Home\Desktop\Screenshots\Screen Shot*.png, %MoveTo%
- SetWorkingDir \\psf\Home\Desktop\Screenshots\%PrintMonth%
- FileList =
- Loop, Screen Shot*.png
- {
- TimeStamp := SubStr(A_LoopFileName, 21)
- FileList = %FileList%%TimeStamp%`n
- }
- IfNotExist \\psf\Home\Desktop\Screenshots\%PrintMonth%
- FileCreateDir \\psf\Home\Desktop\Screenshots\%PrintMonth%
- numFiles := 0, numFiles2 := 0
- Loop, parse, FileList, `n
- {
- FileMove, \\psf\Home\Desktop\Screenshots\%PrintMonth%\Screen Shot %PrintMonth%-%A_LoopField%, \\psf\Home\Desktop\Screenshots\%PrintMonth%\%A_LoopField%
- numFiles++
- }
- FileList =
- SetWorkingDir \\psf\Home\Downloads\Mover\
- Loop, *.???*
- FileList = %FileList%%A_LoopFileName%`n
- IfNotExist \\psf\Home\Downloads\%PrintMonth%
- FileCreateDir \\psf\Home\Downloads\%PrintMonth%
- Loop, parse, FileList, `n
- {
- FileMove, \\psf\Home\Downloads\Mover\%A_LoopField%, \\psf\Home\Downloads\%PrintMonth%\%A_LoopField%
- numFiles2++
- }
- if numFiles2 <> 0
- numfiles2 -= 2
- if numFiles <> 0
- numfiles -= 1
- FileDelete, %A_MyDocuments%\AHK Scripts\completed.txt
- FileAppend,
- (
- %numFiles% file(s) to Screenshots\%PrintMonth%\
- %numFiles2% file(s) to Downloads\%PrintMonth%\
- ), %A_MyDocuments%\AHK Scripts\completed.txt
Advertisement
Add Comment
Please, Sign In to add comment