3

On a windows server, using a DOS command, how can I delete files in the current directoy that have the pattern like:

  • testcase-234.html
  • testcase-2322.html
  • testcase-12.html

i.e. files that begin with testcase-xxx.html

Mark Henderson
  • 68,823
  • 31
  • 180
  • 259
user2659
  • 1,152
  • 4
  • 20
  • 32

2 Answers2

6

Umm del testcase-*.html

Zypher
  • 37,405
  • 5
  • 53
  • 95
2
del testcase-*.html

Is this a trick question?

Cheeso
  • 572
  • 3
  • 18
  • 2
    You forget, it's been a very long time since the command prompt was actually required for use of an OS. It's quite possible that this user has honestly never had any use for it. – Mark Henderson Jan 12 '10 at 01:14
  • "it's been a very long time since the command prompt was actually required for use of an OS" - you might be surprised next time you try an Unix-based one. – user1686 Jan 12 '10 at 14:27
  • I can't imagine managing an OS without a command prompt and scripting capability. – Cheeso Mar 26 '10 at 22:15
  • 1
    I've been using PowerShell so long I can't remember what cmd can actually do. – mlhDev Oct 06 '19 at 00:28