質問

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

役に立ちましたか?

解決

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...

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top