hi all, I am in need of what I believe is quite a simple .bat file.
I have a large folder with perhaps 16,000 .wav files in it. I need to delete about 4000 of them.
I have a .txt list of the exact file names that I want to delete and would like to automate this.
Can anyone recommend the best way I go about this?
cheers all thanks for your time
delete files from a list
Moderator: DosItHelp
-
- Posts: 48
- Joined: 18 Oct 2012 21:27
Re: delete files from a list
I tried to search for this, as im sure it will be already out there, but the search facility on the site needed more specifics than 'batch delete' or ' delete files from list'
Re: delete files from a list
Give this a shot. Remove the echo keyword to enable the deletions. It will only show them on the screen atm.
Code: Select all
@echo off & for /f "delims=" %%a in (list.txt) do echo del "%%a"
-
- Posts: 48
- Joined: 18 Oct 2012 21:27
Re: delete files from a list
Ah thanks heaps this works great