In windows you need to be able to see the file's extension so you can rename a .txt file to .bat

This batch code I wrote searches your C:\ drive for video files and drops the results into a file. That file is then processed into links on a web-page. The web-page is then opened for you to view. Click the links to view the file, right click -> save as to save to another place on your computer. I use it a lot after browsing videos on the web. It's fun to see what videos end up cached (left on the computer from browsing)

Insert this into a file named vid-search.txt
Then save, rename the file vid-search.bat
Then open the vid-search.bat file like you would any file. It will work its magic.

Xeek is just one of my many online aliases smile.gif

CODE
@echo off
cls
echo.
echo.
echo      ****************************
echo      ****                    ****
echo      *** Video Finder by Xeek ***
echo      ****                    ****
echo      ****************************
echo.
echo.
echo Searching for flv files
dir /o-s/b/s/l c:\*.flv >>.\vidz.txt
echo.
echo Searching for avi files
dir /o-s/b/s/l c:\*.avi >>.\vidz.txt
echo.
echo Searching for mpg files
dir /o-s/b/s/l c:\*.mpg >>.\vidz.txt
echo.
echo Searching for mpeg files
dir /o-s/b/s/l c:\*.mpeg >>.\vidz.txt
echo.
echo Searching for mov files
dir /o-s/b/s/l c:\*.mov >>.\vidz.txt
echo.
echo Searching for asf files
dir /o-s/b/s/l c:\*.asf >>.\vidz.txt
echo.
echo Searching for wmv files
dir /o-s/b/s/l c:\*.wmv >>.\vidz.txt
echo.
echo Searching for divx files
dir /o-s/b/s/l c:\*.divx >>.\vidz.txt
echo.
echo Searching for ram files
dir /o-s/b/s/l c:\*.ram >>.\vidz.txt
cls
echo Processing...
echo ^<h1 align="center"^>Vid Finder by Xeek^</h1^>^<hr^>^<font face="Courier New" size=1^> >.\vidz.html
for /F "tokens=*" %%v in (.\vidz.txt) do @echo ^<a href="%%v"^>%%v^</a^>^<br^> >>.\vidz.html
start .\vidz.html MAX
del .\vidz.txt


Maybe someone can help script a better way to present the results?

 

 

 


Reply