Question

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

Was it helpful?

Solution

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.

More info is here...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top