Reputation: 1
Can someone please help me to make a batch file to delete files beginning with the name Stock Level which are .csv files stored in C:\Windows\Temp folder.
I would like to test it first to see what it proposes to delete before I make it live so if someone can show may what I need to delete to make it live as well.
Thanks very much in advance for your help.
Roy
Upvotes: 0
Views: 655
Reputation: 80203
As a batch file,
@echo off
setlocal
for %%a in ("c:\windows\temp\stock level*.csv") do echo(del "%%a"
should generate your list by executing echo("%%a"
for %%a
set to each filenme matching the mask supplied.
If the result is correct, simply remove the echo(
part to activate the del
Upvotes: 1