New file shortcut

There is no way to create a new file in Windows explorer using a shortcut. You can Ctrl+Shift+N to create a new folder but strangely nothing to create a file.

The solution is to use AutoHotKey and a script. This one works on Windows 8. It was adapted from here.

#IfWinActive ahk_class CabinetWClass

; Create new file in Explorer
^N::
NewTextFile()
return

#IfWinActive

NewTextFile()
{
WinGetText, full_path, A
StringSplit, word_array, full_path, `n
Loop, %word_array0%
{
IfInString, word_array%A_Index%, Address
{
full_path := word_array%A_Index%
break
}
}
full_path := RegExReplace(full_path, "^Address: ", "")
StringReplace, full_path, full_path, `r, , all

IfInString full_path, \
{
NoFile = 0
Loop
{
IfExist %full_path%\NewTextFile%NoFile%.txt
NoFile++
else
break
}
FileAppend, ,%full_path%\NewTextFile%NoFile%.txt
}
else
{
return
}
}