Skip to main content

All Questions

Tagged with
9 votes
1 answer
220 views

Understanding why the DIR command behaves this way

Why does: dir "test.txt " dir test.txt. dir "test.txt . . ." all lists test.txt with no error on Windows prompt? Are there any other suffix that are ignored by Windows? (please note that I ...
Guillaume's user avatar
  • 193
3 votes
1 answer
9k views

How to not show file path with dir /b /s command in batch file

Is there Any way I can bypass displaying file paths when using the dir /b /s command into a file? Currently, when I run dir /b /s C:\WinPE_amd64 >dir.txt it outputs something like this: C:\...
Mark Deven's user avatar
  • 1,660
10 votes
1 answer
12k views

Is it possible to pipe a list of files to RMDIR on Windows?

I am writing a batch file for the Windows command prompt to delete all directories matching a certain expression. I am first using DIR to return a plain list of directories matching the expression. I ...
user78755's user avatar
  • 103