Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
Noobknight
- Posts: 5
- Joined: 18 Nov 2018 20:31
#1
Post
by Noobknight » 18 Apr 2019 03:23
Hi guys!
I want to check folder "Downloads" is opening or not using command line. I tried with wmic or find commands to get process of Windows Explorer but still stuck.

Many Thanks!
-
Squashman
- Expert
- Posts: 4488
- Joined: 23 Dec 2011 13:59
#2
Post
by Squashman » 18 Apr 2019 08:27
Learned this from dbenham.
Code: Select all
2>nul ren Downloads Downloads && echo Folder is NOT locked || echo folder is LOCKED
-
Noobknight
- Posts: 5
- Joined: 18 Nov 2018 20:31
#3
Post
by Noobknight » 18 Apr 2019 21:19
Squashman wrote: ↑18 Apr 2019 08:27
Learned this from dbenham.
Code: Select all
2>nul ren Downloads Downloads && echo Folder is NOT locked || echo folder is LOCKED
Thanks for reply bro!
But when I opened folder "Downloads" command line "ren" or "rename" still working fine. It only throw error when I open a sub folder in "Downloads"