Created
March 2, 2017 19:32
-
-
Save chrisengelsma/1ecbf96b19c87184da89c6f6760c60a2 to your computer and use it in GitHub Desktop.
"touch" script for Windows Command Prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal enableextensions disabledelayedexpansion | |
(for %%a in (%*) do if exist "%%~a" ( | |
pushd "%%~dpa" && ( copy /b "%%~nxa"+,, & popd ) | |
) else ( | |
type nul > "%%~fa" | |
)) >nul 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment