Windows scripting: list files not matching a pattern

前端 未结 3 1745
一生所求
一生所求 2021-01-15 13:31

In Windows 7 command prompt, I´d like to list all files of a folder which name does not start with abc. I have tried:

forfiles /P C:\\myFolder\\         


        
3条回答
  •  半阙折子戏
    2021-01-15 14:27

    Where is my error?

    Your error is thinking that the forfiles command would support regular expressions.

    It does not. It supports file name matching with * and ?.

提交回复
热议问题