Created
February 16, 2018 10:03
-
-
Save Leandros/48a30b30f4e38b603758263d4ab6d6c4 to your computer and use it in GitHub Desktop.
*nix like touch on Windows
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