How to Delet all video file format using batch file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
umbrellaco
Posts: 4
Joined: 03 Oct 2011 06:21

How to Delet all video file format using batch file

#1 Post by umbrellaco » 03 Oct 2011 06:37

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

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

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

#2 Post by aGerman » 03 Oct 2011 10:43

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

umbrellaco
Posts: 4
Joined: 03 Oct 2011 06:21

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

#3 Post by umbrellaco » 04 Oct 2011 07:49

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

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

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

#4 Post by aGerman » 04 Oct 2011 11:35

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

umbrellaco
Posts: 4
Joined: 03 Oct 2011 06:21

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

#5 Post by umbrellaco » 05 Oct 2011 07:22

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 .

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

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

#6 Post by aGerman » 07 Oct 2011 15:02

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

umbrellaco
Posts: 4
Joined: 03 Oct 2011 06:21

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

#7 Post by umbrellaco » 09 Oct 2011 09:27

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

nitt
Posts: 218
Joined: 22 Apr 2011 02:43

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

#8 Post by nitt » 09 Oct 2011 19:44

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.

Post Reply