#NoEnv #SingleInstance force SetWorkingDir %A_ScriptDir% FileEncoding UTF-8 SetBatchLines, -1 drive := "F:\" file := "Dummy.txt" path := drive . file text := "Dummy" if FileExist(drive) { Loop { if FileExist(path) FileDelete, % path FileAppend, % text, % path } }