Hi,
I am trying to write a program to sort my jpgs by date created. I have recieved alot of help and I want to say thank you. I almost have what I am trying to achieve.
What I am wanting is for it to be recursive. So that if I say sort the "My Pictures" directory that it will sort that folder and all sub folders within subfolders, within subfolder, inside of "my pictures" I have not been successful. I think I am trying to make it to hard. I have been trying to read all folders within a directory, put them into an array and then run the program on each of them. This may be indeed how you do it, but I can not get it to work. Also, it seems that there should be an easier way. Here is my working base code
Code:
Gui,Font,Bold
Gui,Font,Underline
Gui,add,Text, w400 x1 y10 Center,AutoSort
Gui,Font,Norm
Gui,Font,Bold
Gui,Add,Text, w400 x1 y60 Center,This program will sort the file extension that you input
Gui,Add,Text, w400 x1 y75 Center,into the text field below into individual folders labeled by
Gui,Add,Text, w400 x1 y90 Center,the date the file was created.
Gui,add,Text, w200 x90 y110 Center, Enter three digit file extension:
Gui,add,edit, w28 x280 y108 vMyEdit,
Gui,add,button, w400 x1 y130 gSelect, select Folder to sort
Gui,show, w401
Return
MoveDateCreated:
Gui,Submit
formattime, begin,,MMMM dd yyyy
MoveFiles = 0
;msgbox,%MyEdit%
Loop, %outputvar%\*.%MyEdit%,0,1
{
FormatTime, ALFTC, %A_LoopFileTimeCreated%, MMMM dd yyyy
NewFolder := A_LoopFileDir "\" ALFTC
IfNotExist, %NewFolder%
FileCreateDir, %NewFolder%
; save the moving for later
MoveFiles++
MoveFileFrom%MoveFiles% := A_LoopFileLongPath
MoveFileto%MoveFiles% := NewFolder
}
Loop %MoveFiles%
{
FileMove,% MoveFileFrom%A_Index%, % MoveFileTo%A_Index%
}
Return
Select:
FileSelectFolder, OutputVar, , 3
gosub, MoveDateCreated
Return
any help would be appreciated