Skip to content

Instantly share code, notes, and snippets.

@cuikangyi
Last active October 13, 2017 06:29
Show Gist options
  • Save cuikangyi/060d608f71f6cc3de15508ecee5ebfd1 to your computer and use it in GitHub Desktop.
Save cuikangyi/060d608f71f6cc3de15508ecee5ebfd1 to your computer and use it in GitHub Desktop.
@echo off
setlocal enableDelayedExpansion
rem 依赖TimeBack
rem 目录(end by '\')
set DestPath=x:\
for /f "delims=" %%i in ('dir /b %DestPath%') do (
set str=%%i
call :format
echo %DestPath%%%i
echo !str!
TimeBack /F "%DestPath%%%i" /T !str! -C -R -V
echo.
echo.
rem echo %DestPath%%%i
)
//格式化文件名
:format
set "str=!str:-=/!"
set "str=!str:.=/!"
set "str=!str: =/!"
set "str=!str:~0,19!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment