Function Replace($String,$SS,$RS)
$Replace=Join(Split($String,$SS),$RS)
EndFunction
function GetExtFileProperties($FQFN, $attribute)
dim $objShell, $objFolder,$i,$found
if exist($FQFN)
$objShell=CreateObject("Shell.Application")
$objFolder=$objShell.Namespace(left($FQFN,instrrev($FQFN,"\")))
if $objFolder
if vartypename($attribute)="string"
While $i<267 and $found=0
if $attribute=$objFolder.GetDetailsOf($objFolder.Items, $i)
$attribute=$i
$found=1
endif
$i=$i+1
loop
endif
if vartypename($attribute)="long" ; Number
$GetExtFileProperties=$objFolder.GetDetailsOf($objFolder.ParseName(right($FQFN,len($FQFN)-instrrev($FQFN,"\"))),$att
ribute)
else
exit -1
endif
else
exit @error
endif
else
exit 2
endif
endfunction
$ShortPath = "D:\Music\"
$Path = "D:\Music\*.mp3"
$outputpath = "C:\OUtput\"
$FileName = Dir($path)
While $FileName <> "" and @ERROR = 0
$DateCreated = GetExtFileProperties($ShortPath + $FileName, "Date Created")
$TrimmedDate = LEFT($DateCreated, 10)
$TrimmedDateWithoutSlashes = Replace($TrimmedDate ,"/", "")
;Next Step... Create Folder
If NOT Exist ($ShortPath + $TrimmedDateWithoutSlashes)
MD "$$outputpath" + "$TrimmedDateWithoutSlashes"
Else
Copy "$Path\$FileName" "$outputpath\$TrimmedDateWithoutSlashes"
$FileName = Dir() ; retrieve next file
Loop