Reputation: 142
How to get a full folder name from its partial or half name and delete it. suppose I have a folders in my temp directive
scoped_dir3364_20212,scoped_dir3894_27812
In those folders scoped_dir is common.i want to delete these directory from command prompt. please tell how to do that
Thanks
Upvotes: 0
Views: 582
Reputation: 8332
Navigate to your temp
directory in cmd
and you could use the FOR /D
command as below:
for /d %p in (scoped_dir*) do rd /s /q "%p"
In all cases for /d
will start searching from the current directory.
Upvotes: 1