Batch File to Delete File

会有一股神秘感。 提交于 2020-01-07 03:51:41

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/43013802/batch-file-to-delete-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!