0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Windows10の不要ファイルをコマンドプロンプトで強制的に削除する方法

Posted at

はじめに

Windows10でファイルを削除しようとすると、

「ディレクトリが空ではありません」、「別のプログラムがこのフォルダーまたはファイルを開いているので、操作を完了できません」などと表示され、うまく削除できないことがあります。それをサクッと削除する方法です。

ググると方法が多数出てきますが、そのうち一番うまくいった方法を、忘れないように書いておきます。

手順

1. 削除したいフォルダのパス名をチェックする

エクスプローラーで、フォルダを右クリック→プロパティからパス名を表示させ、コピーする
image.png

2. コマンドプロンプトを起動する

左下のボックスに'cmd'と入力し、コマンドプロンプトを起動する
Clipboard.jpg

3. 以下のコマンドを入力

C:\Users\ユーザー名>rd /s ファイルやフォルダのパス名(URL)

/sはフォルダ内が空でなくても強制削除するという意味です。
以上です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?