-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd-dates.bat
More file actions
27 lines (22 loc) · 582 Bytes
/
Copy pathadd-dates.bat
File metadata and controls
27 lines (22 loc) · 582 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@echo off
echo ============================================
echo Bulk Add Dates to Draft Files
echo ============================================
echo.
set TODAY=%date:~10,4%-%date:~4,2%-%date:~7,2%
set DRAFTS=%CD%\_drafts
set POSTS=%CD%\_posts
if not exist "%POSTS%" mkdir "%POSTS%"
echo Date: %TODAY%
echo.
echo Moving files from _drafts to _posts...
echo.
for %%f in ("%DRAFTS%\*.md") do (
set "filename=%%~nxf"
set "newname=%TODAY%-%%~nxf"
echo Moving: %%~nxf → !newname!
move "%%f" "%POSTS%\%TODAY%-%%~nxf"
)
echo.
echo Done! Check _posts/ folder.
pause