Batch File; List files in directory, only filenames?

前端 未结 8 1393
我在风中等你
我在风中等你 2021-01-29 22:07

This is probably a very simple question, but I\'m having trouble with it. Basically, I am trying to write a Batch File and I need it to list all the files in a certain directory

8条回答
  •  暖寄归人
    2021-01-29 22:33

    You can also try this:

    for %%a in (*) do echo %%a
    

    Using a for loop, you can echo out all the file names of the current directory.

    To print them directly from the console:

    for %a in (*) do @echo %a
    

提交回复
热议问题