Dexif/Shortcuts.AHK

20 lines
992 B
AutoHotkey

for n, param in A_Args ; For each parameter:
{
SUPPORTED := "360|3g2|3gp|aax|ai|arq|arw|avif|cr2|cr3|crm|crw|cs1|dcp|dng|dr4|dvb|eps|erf|exif|exv|f4a|f4v|fff|flif|gif|glv|gpr|hdp|heic|heif|icc|iiq|ind|insp|jng|jp2|jpeg|lrv|m4a|m4v|mef|mie|mng|mos|mov|mp4|mpo|mqv|mrw|nef|nksc|nrw|orf|ori|pbm|pdf|pef|pgm|png|ppm|ps|psb|psd|qtif|raf|raw|rw2|rwl|sr2|srw|thm|tiff|vrd|wdp|webp|x3f|xmp|jpg|JPG"
; Cycle Through files, param is full path
If (InStr(FileExist(FolderFile),"D")){
; Is Directory, Cycle and recurse
; TODO
}
Else {
If (RegExMatch(param, "i).*\.(" SUPPORTED ")$")) {
BaseName := RegExReplace(param, "i)\.(" SUPPORTED ")$", "")
Extension := RegExReplace(param, "i)^.*\.(" SUPPORTED ")$", "$1")
If (FileExist(param)){
FixedFile := BaseName ".dexif." Extension
Run, "exiftool.exe" "-all=" "%param%" "-o" "%FixedFile%" ,,Hide
}
}
}
}