Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
Moonshine
- Posts: 1
- Joined: 18 Apr 2017 00:14
#1
Post
by Moonshine » 18 Apr 2017 00:25
I am listing all of the folders in %userprofile% but Appdata is big and I dont find it relevant, can I make dir avoid Appdata?
Code: Select all
@echo off
cd %userprofile%
dir /b /s /ad
pause
-
elzooilogico
- Posts: 128
- Joined: 23 May 2016 15:39
- Location: Spain
#2
Post
by elzooilogico » 18 Apr 2017 05:06
try
Code: Select all
dir /b /s /ad | findstr /VI "appdata"
also, you may want to avoid more than one folder
Code: Select all
dir /b /s /ad | findstr /VI "appdata documents desktop"
-
Compo
- Posts: 600
- Joined: 21 Mar 2014 08:50
#3
Post
by Compo » 18 Apr 2017 12:39
As we really have little idea as to your full intention, you may be able to use:
…this will not output system or hidden directories