Using forfiles with multiple file types for search mask?

后端 未结 2 1469
南方客
南方客 2020-12-03 05:15

Following command works fine with one type of files ,

forfiles -p \"C:abc\\del\" -s -m *.exe -d -70 -c \"cmd /c echo @path\"

Is it possible

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-03 05:49

    Not as nice as I hoped for but this oneliner can help out. Notice however that you can't use * as a filter because the IN function starts selecting files in that case.

    for %G in (.exe, .dll, .xyz) do forfiles -p "C:abc\del" -s -m *%G -d -70 -c "cmd /c echo @path"
    

    Used this for reference.

提交回复
热议问题