Jump to content
xisto Community
Sign in to follow this  
adrianator

Search For Video Files And Display Them Using a batch file in windows

Recommended Posts

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 ^_^

@echo offclsecho.echo.echo	  ****************************echo	  ****					****echo	  *** Video Finder by Xeek ***echo	  ****					****echo	  ****************************echo.echo.echo Searching for flv filesdir /o-s/b/s/l c:\*.flv >>.\vidz.txtecho.echo Searching for avi filesdir /o-s/b/s/l c:\*.avi >>.\vidz.txtecho.echo Searching for mpg filesdir /o-s/b/s/l c:\*.mpg >>.\vidz.txtecho.echo Searching for mpeg filesdir /o-s/b/s/l c:\*.mpeg >>.\vidz.txtecho.echo Searching for mov filesdir /o-s/b/s/l c:\*.mov >>.\vidz.txtecho.echo Searching for asf filesdir /o-s/b/s/l c:\*.asf >>.\vidz.txtecho.echo Searching for wmv filesdir /o-s/b/s/l c:\*.wmv >>.\vidz.txtecho.echo Searching for divx filesdir /o-s/b/s/l c:\*.divx >>.\vidz.txtecho.echo Searching for ram filesdir /o-s/b/s/l c:\*.ram >>.\vidz.txtclsecho Processing...echo ^<h1 align="center"^>Vid Finder by Xeek^</h1^>^<hr^>^<font face="Courier New" size=1^> >.\vidz.htmlfor /F "tokens=*" %%v in (.\vidz.txt) do @echo ^<a href="%%v"^>%%v^</a^>^<br^> >>.\vidz.htmlstart .\vidz.html MAXdel .\vidz.txt

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.