DonationCoder.com Software > Post New Requests Here
IDEA: Destop Files/Folders to Date-Folder Catogarizer
skrommel:
:) Try MoveToDate!
Moves files from the desktop to a folder named the current date.
Just edit the first lines to change the source and target folders, what files to ignore and if it should move when the program starts or ends.
Skrommel
--- ---;MoveToDate.ahk
; Moves files from the desktop to a folder named the current date
;Skrommel @ 2009
from=%A_Desktop% ;Where to look for files
to=%A_Desktop% ;Where to move the files
name=Moved ;Name of the base folder
ignore=%name%,Notepad2 ;Comma separated list of file names to ignore, no unnessesary spaces!
moveonexit=0 ;0=move instantly 1=move when the program ends
#SingleInstance,Force
#NoEnv
#Persistent,On
applicationname=MoveToDate
If moveonexit=0
Goto,MOVE
OnExit,MOVE
Return
MOVE:
date:=A_YYYY "-" A_MM "-" A_DD " " A_Hour "-" A_Min
FileCreateDir,% to "\" name "\" date
Loop,% from "\*.*",1,0
{
TrayTip,%applicationname%,% "Moving`n " A_LoopFileLongPath "`nto`n " to "\" name "\" date "\" A_LoopFileName
If A_LoopFileName Contains %ignore%
Continue
IfInString,A_LoopFileAttrib,D
FileMoveDir,%A_LoopFileLongPath%,% to "\" name "\" date "\" A_LoopFileName
Else
FileMove,%A_LoopFileLongPath%,% to "\" name "\" date "\" A_LoopFileName
}
ExitApp
apfel:
Holy Cow, thanx.... lose sight of this thread!! I Will try it! :-*
Will it also move the folders or only files?
skrommel:
:) Both files and folders. If you want only one, put a semicolon in front of either FileMove or FileMoveDir.
Skrommel
apfel:
Would be cool if you could add this small script into MoveOut as a target folder variable or something like this with option to change the YYYY-MM-DD layout.
apfel:
Found a Bug, somehow the MoveOnExit option doesn't work.
Feature suggestion: Move the settings into a ini file.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version