Page 1 of 1

How to Delet all video file format using batch file

Posted: 03 Oct 2011 06:37
by umbrellaco
i Want to know How to Delet all video file format using batch file & i want add batch file to AUTOEXC.BAT (system configuration editor). how to do it please help me guys .it mean i need to all days run this batch file when computer on

Re: How to Delet all video file format using batch file

Posted: 03 Oct 2011 10:43
by aGerman

Code: Select all

@echo off &setlocal
:: Rootfolder of files to delete
set "root=D:\somewhere"

:: extensions of files you want to delete
:: you could add more extensions (space separated)
set "extensions=*.avi *.mpg *.mp4 *.flv *.wmv"

cd /d "%root%" ||goto :eof
for /f "delims=" %%i in ('dir /a-d /b /s %extensions%') do ECHO del "%%i"

Remove the ECHO in the last line if you're sure it would work.

Place the file (or a link) in the autorun folder, if you want it run for each logon.

Regards
aGerman

Re: How to Delet all video file format using batch file

Posted: 04 Oct 2011 07:49
by umbrellaco
aGerman wrote:

Code: Select all

@echo off &setlocal
:: Rootfolder of files to delete
set "root=D:\somewhere"

:: extensions of files you want to delete
:: you could add more extensions (space separated)
set "extensions=*.avi *.mpg *.mp4 *.flv *.wmv"

cd /d "%root%" ||goto :eof
for /f "delims=" %%i in ('dir /a-d /b /s %extensions%') do ECHO del "%%i"

Remove the ECHO in the last line if you're sure it would work.

Place the file (or a link) in the autorun folder, if you want it run for each logon.

Regards
aGerman



Thank u aGerman

but i need to delet all computer audio video exextensions how to do that ?and explan this more (type only code thn i can understand) thank u

Re: How to Delet all video file format using batch file

Posted: 04 Oct 2011 11:35
by aGerman
Sorry, but now I'm unsure if I misunderstood your requirement.
i need to delet all computer audio video exextensions

What does it mean? Do you want to delete each audio or video file? Or does it mean that you want to delete the associations of the file extensions in your registry? Please clarify.

Regards
aGerman

Re: How to Delet all video file format using batch file

Posted: 05 Oct 2011 07:22
by umbrellaco
aGerman wrote:Sorry, but now I'm unsure if I misunderstood your requirement.
i need to delet all computer audio video exextensions

What does it mean? Do you want to delete each audio or video file? Or does it mean that you want to delete the associations of the file extensions in your registry? Please clarify.

Regards
aGerman


no bro i want delet only audio and video file only in my computer .

Re: How to Delet all video file format using batch file

Posted: 07 Oct 2011 15:02
by aGerman
Well, in this case you can use my first code. Just use C:\ for root, add all audio and video extensions you know to variable extensions and remove the ECHO command in the last line as I told you before.

Regards
aGerman

Re: How to Delet all video file format using batch file

Posted: 09 Oct 2011 09:27
by umbrellaco
aGerman wrote:Well, in this case you can use my first code. Just use C:\ for root, add all audio and video extensions you know to variable extensions and remove the ECHO command in the last line as I told you before.

Regards
aGerman


can u type the code in here that will be great .and i have 2 partition my hard .

thank u

Re: How to Delet all video file format using batch file

Posted: 09 Oct 2011 19:44
by nitt
umbrellaco wrote:
aGerman wrote:Sorry, but now I'm unsure if I misunderstood your requirement.
i need to delet all computer audio video exextensions

What does it mean? Do you want to delete each audio or video file? Or does it mean that you want to delete the associations of the file extensions in your registry? Please clarify.

Regards
aGerman


no bro i want delet only audio and video file only in my computer .


Since it appears you have (somewhat) been helped, or no one is understanding your question, I think I'm just going to simply say

DOWNLOAD GOOGLE CHROME. IT HAZ SPELLCHECK.