Skip to content

Instantly share code, notes, and snippets.

@peanutpi
Last active December 21, 2015 15:16
Show Gist options
  • Save peanutpi/1ad1adedcfa325d2f74f to your computer and use it in GitHub Desktop.
Save peanutpi/1ad1adedcfa325d2f74f to your computer and use it in GitHub Desktop.
@echo off & setlocal & setlocal EnableDelayedExpansion
IF [%1] == [] exit /b
echo ^>^>^> Scanning Started !!
set extentions=*webm *mkv *flv *avi *mov *wmv *mp4 *m4p *m4v *mpg *mpeg *mpeg *3gp
echo.
echo.
echo.
echo Name,Size(In Byte),Parent>%USERPROFILE%\Desktop\total.csv
FOR /r %1 %%I IN (%extentions%) DO (
echo -------
set fileName=%%~nxI
echo !fileName!
set fileParent=%%~pI
echo !fileParent!
echo "!fileName!",%%~zI,"!fileParent!" >> %USERPROFILE%\Desktop\total.csv
echo -------
)
echo.
echo.
echo.
endlocal
echo ^>^>^> Scanning Finished !!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment