Skip to main content

All Questions

Tagged with
3 votes
1 answer
8k views

rmdir favorites Access is Denied

Command prompt: CD C:\Users\Example\ rmdir favorites Access is denied. How do I delete the Favorites folder via the command prompt? Yes, I want to do this. Yes, I know this folder is for Internet ...
John's user avatar
  • 2,147
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
1 vote
1 answer
577 views

Dir piped into Set

Im trying to make a program that selects a file name, then pipes it into a variable. My Attempt: Dir /B "C:\Program Files (x86)\ServerMaster\Internals\Versions\Van1" | (set /p myVar= & set myVar)...
Brennan Olson's user avatar
0 votes
2 answers
238 views

What is wrong with this Batch file

e: cd \My Files dir a:\ >\Prt2Txt\adrv1.txt\ pause results in: E:\My Files>nhm E:\My Files>e: E:\My Files>cd \My Files E:\My Files>dir a:\ 1>\Prt2Txt\adrv1.txt\ The system ...
Neil Murphy's user avatar
2 votes
1 answer
17k views

Batch File, dir | findstr within a for loop

Let me preface by admitting that I am a complete noob at batch files... and programming language in general. I am trying to write a batch file that allows the user to input a partial filename, and it ...
Gumbi's user avatar
  • 23
3 votes
1 answer
8k 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
5 votes
4 answers
10k views

dir folders at a certain folder depth in a batch file

I want, with a batch file, to be able to search and display the files in a bunch of folders called "error" located in a bunch of different places. The error folder is always at the same folder depth ...
Tomas's user avatar
  • 73
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