All excellent points, only issue I see is one of your suggestions was written wrong. You turned basic my arithmetic operation into a variable with an assignment operator without adding a = sign
$outdir = "_" . ($year+1900) . "\\" . ($mon+1) . "\\" ;For a file modified today, Aug 26 2011 that would return
$year = 111 $mon = 7$outdir = "_" . ($year+=1900) . "\\" . ($mon+=1) . "\\" ;
That will return what were actually looking for, tho I typically just use the $mon++ anyway for that and they both give.
$year = 2011 $mon = 8
In any case, thank you all for the suggestions I clearly overlooked some important issues too though oddly enough everything still worked ok i'll rewrite it for simplicity.
In reply to Re^2: Moving files to subfolders based on their last modified date
by shadowfox
in thread Moving files to subfolders based on their last modified date
by shadowfox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |