Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Create a text file from file passed as the parameter
- DetectHiddenWindows, Off ; they're hidden for a reason.
- If 0 < 1
- ExitApp
- filepath = %1%
- SplitPath, filepath, sFileName, sDir, sExtension, sNameNoExt, sDrive
- If ( sExtension != "TXT" ) OR ( sExtension != "txt" ) ; upper-case / lower-case
- {
- If ( !FileExist( sDir . "\" . sNameNoExt . ".TXT" ) OR !FileExist( sDir . "\" . sNameNoExt . ".txt" ) )
- {
- FileAppend, %sNameNoExt%, %sDir%\%sNameNoExt%.txt
- }
- Else
- {
- Run, % sDir . "\" . sNameNoExt . ".txt"
- }
- }
- Return
Advertisement
Add Comment
Please, Sign In to add comment