Selasa, 24 Agustus 2010

Cara menghapus file atau folder yang sulit dihapus

Pernahkah anda menghadapi masalah file ataupun folder yang tidak bisa anda hapus ?
Sebenarnya ada beberapa macam penyebab dari file atau folder tidak bisa dihapus , diantaranya :
  1. File tersebut masih dalam kondisi masih dibuka ( dijalankan ) , misalnya kita mau menghapus file bernama data.doc yang masih kita buka maka file yang kita buka tersebut sudah bisa dipastikan tidak bisa dihapus , sebelum aplikasi ataupun data yang kita buka tersebut kita close ( kita tutup ) . Ini sering terjadi disaat kita ingin menghapus file Virus secara manual . Untuk mengetahui file yang mau kita tutup itu masih berjalan apa tidak kita bisa menggunakan task manager , Tekan Crtl+Alt+Del maka bila komputer dalam keadaan normal akan keluar task manager di task manager ada tab-tab antara lain : Aplications > digunakan untuk mengetahui file ataupun folder yang sedang dibuka ( dijalankan ) , jika kita ingin menutup sebuah aplikasi kita tinggal klik aplikasi yang kita inginkan klik kanan dan pilih end task . Tab yang kedua adalah Processes > Digunakan untuk melihat file aplikasi termasuk file system yang sedang berjalan , disini kita bisa melihat nama file , User name dan memory yang digunakan file tsb.
  2. Pembatasan hak akses file , seperti di Windows server dan juga di linux setiap user diberi hak akses sesuai hak yang dimilikinya , misalnya hak tertinggi di Windows adalah Administrators dan tertinggi di Linux adalah Root. Jadi selain Administrators dan Root user tidak bisa menghapus file ataupun folder ( terutama System ) . Command untuk membatasi hak akses sebuah file dan folder di Windows adalah ” Cacls.exe” Contoh penggunaan command ini seperti artikel ini , Tapi kadang ada pula Virus yang me-lock filenya agar tidak bisa dihapus . Untuk mengatasinya kita bisa menggunakan command cacls ini untuk lebih jelasnya ketik cmd di menu run dan ketikkan perintah cacls di prompt maka akan keluar help-nya seperti ini :
Displays or modifies access control lists (ACLs) of files
CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]]
[/P user:perm [...]] [/D user [...]]
filename Displays ACLs.
/T Changes ACLs of specified files in
the current directory and all subdirectories.
/E Edit ACL instead of replacing it.
/C Continue on access denied errors.
/G user:perm Grant specified user access rights.
Perm can be: R Read
W Write
C Change (write)
F Full control
/R user Revoke specified user’s access rights (only valid with /E).
/P user:perm Replace specified user’s access rights.
Perm can be: N None
R Read
W Write
C Change (write)
F Full control
/D user Deny specified user access.
Wildcards can be used to specify more that one file in a command.
You can specify more than one user in a command.
Abbreviations:
CI – Container Inherit.
The ACE will be inherited by directories.
OI – Object Inherit.
The ACE will be inherited by files.
IO – Inherit Only.
The ACE does not apply to the current file/directory.
Coba anda reka reka sendiri perintahnya …. :)
3. File tidak bisa dihapus karena file system error atau file tersebut berukuran o bit . Untuk mengatasi yang seperti ini kita bisa pakai Command “chkdsk/f” Caranya : ketik cmd di menu Run , setelah keluar prompt kita masuk ke partisi ataupun Usb disk / Hard disk portable . misalnya : drive e: , maka ketik e: lalu enter . Setelah prompt berada di d: ketikkan chkdsk /f untuk prakteknya perhatikan hasilnya seperti dibawah ini :
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\KA-ILAAHI.ADMIN>e:
E:\>chkdsk/f
The type of the file system is NTFS.
Cannot lock current drive.
Chkdsk cannot run because the volume is in use by another
process. Chkdsk may run if this volume is dismounted first.
ALL OPENED HANDLES TO THIS VOLUME WOULD THEN BE INVALID.
Would you like to force a dismount on this volume? (Y/N ) y
Volume dismounted. All opened handles to this volume are now invalid.
Volume label is Data.
CHKDSK is verifying files (stage 1 of 3)…
File verification completed.
CHKDSK is verifying indexes (stage 2 of 3)…
Index verification completed.
CHKDSK is verifying security descriptors (stage 3 of3)…
Security descriptor verification completed.
Windows has checked the file system and found no problem.
28844672 KB total disk space.
25875776 KB in 15184 files.
5072 KB in 760 indexes.
0 KB in bad sectors.
160512 KB in use by the system.
65536 KB occupied by the log file.
2803312 KB available on disk.
4096 bytes in each allocation unit.
7211168 total allocation units on disk.
700828 allocation units available on disk.
E:\>
Dengan cara-cara ini saya pernah menghapus file atau folder yang tidak bisa saya hapus…
Kalau dengan software pun silakan…. :)

0 comments:

Posting Komentar

Daftar Blog Saya

 
script feeds berjalan Anda