Get F-Droid – Install Newline
Posted on November 24, 2021, 1:10 pm By xuan
No comments yet Categories: tech tips Tags: tech tips
The objective of this bat file is recursive search for MP4s in a source folder and move them into a single dated folder.
@echo off
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
set "datestamp=%YYYY%%MM%%DD%" & set "timestamp=%HH%%Min%%Sec%"
set "fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%"
echo datestamp: "%datestamp%"
echo timestamp: "%timestamp%"
echo fullstamp: "%fullstamp%"
FOR /R "X:\SOURCE" %%i IN (*.mp4) DO (
MD "X:\DESTINATION\%datestamp%\"
MOVE "%%i" "X:\DESTINATION\%datestamp%\")
rem delete the source files left over and folders
x:
cd "X:\SOURCE"
del * /S /q
rd /s /q .
FOR /R "C:\Source Folder" %i IN (*.png) DO MOVE "%i" "C:\Staging Folder"
If you want to put this into a batch file, change %i
to %%i
.
Fantastic app that has many features including audio playback whilst screen is turned off and ad blocking.