Created
July 13, 2015 05:29
-
-
Save gitcrtn/7fb8e37ca00144b3283e to your computer and use it in GitHub Desktop.
ファイルの更新日時を、別のファイル作成のためのファイル名にする
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
for %%i in ("%filename%") do set date=%%~ti | |
set date=%date:/=-% | |
set date=%date::=-% | |
set date=%date: =_% | |
echo date filename test > %date%.txt | |
pause |
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
for %%i in ("%filepath%") do set date=%%~ti | |
for %%i in ("%filepath%") do set drive=%%~di | |
for %%i in ("%filepath%") do set folder=%%~pi | |
set date=%date:/=-% | |
set date=%date::=-% | |
set date=%date: =_% | |
echo date filename test > %drive%%folder%%date%.txt | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment