yaml_3_get_storage_copy_move_date_folder.bat

 avatar
user_3364516
batchfile
8 days ago
702 B
2
Indexable
hassio yaml save lovelace convert
@echo off
set "source=\\192.168.1.114\config\.storage"
set "destination=E:\hassio\dailies"

REM Get the current date in YYYYMMDD format
for /F "tokens=1-3 delims=/ " %%a in ('date /T') do set "date=%%b-%%c-%%a"
REM "date=%%c%%b%%a"

REM Create a folder with the current date as the title
mkdir "%destination%\%date%"

REM Move files with "lovelace" in the name to the created folder
copy "%source%\core.config_entries" "%destination%\%date%"
copy "%source%\core.device_registry" "%destination%\%date%"
copy "%source%\core.entity_registry" "%destination%\%date%"
copy "%source%\core.label_registry" "%destination%\%date%"

echo Files moved to "%destination%\%date%\" folder.





Editor is loading...
Leave a Comment