Delete Files

honggarae 21/02/2022 967

Principle

Thedeletionofthefile(here,thedeletionreferstothedeletefunctionthatcomeswiththeoperatingsystem)isonlytoaddthecodeE5tothefileheaderintheFATtable,andthenthefileoccupiedTheregistrationoftheclusterintheFATtableiscleared(butthedataintheactualharddiskdataareahasnotbeenmodified).Inthisway,thesystemthinksthatthefilenolongertakesupspaceandachievesthepurposeoffreeingupspace.Ifthefileiswrittenlater,thepreviousdatawillbeoverwritten.Oncethedataisoverwritten,itcanbeconsideredtobecompletelydeletedandcannotberestored.Itisworthmentioningthatthefilesarestoredinachainontheharddisk(usingachainstoragestructure),thatis,afileisscatteredinspatiallydiscontinuousclusters.Thisdispersioncanbeapproximatelyregardedasrandom,sosometimesdataoverwritingmaycausethedeletedfilestobedamagedratherthancompletelydeleted.Formoreinformation,pleaserefertothedeletionoftheword.

Method

General

Select,keyboarddeletekeyorrightclick,movetotherecyclebin,emptytherecyclebin

Forstubbornfiles,Youcancreateanewtextdocumentnexttoitandcopythefollowingcontentintoit:

@echooff(thissentenceisoptional)

Delfilename/f/q

Rdfoldername/s/q

Thencloseandclicksave,thenchangethefileextensionto.bat,andrunit

or

@echooff

DEL/F/Q\\?\%1

RD/S/Q\\?\%1

Sameasabove,Theadvantageisthatyoucandragthefileyouwanttodeleteintothisfile,andfinallydeletethefile(thismethodissuitableforsomefilesthatcannotreadthesourcefile)

IfthefileisinCdriveFornon-desktopfolders,administratorrightsmustbeobtained.RightclickonthisBatandrunasadministrator.

Ofcourseyoucanwin+r,entercmd,pressEnter,enter

Del(thefolderisRd)pathfilename/f/q(thefolderis/s/q)

Enter

Fordetails,pleaserefertothedetaileddescriptionofcmdcommand.Togetadescription,besidesBaidu,youcanalsoenterthecommandnameyouwanttoqueryinwin+r,cmd,andadd/?suchasDel/?

Thedeletedobjectmustnotberunningorused.

YoucanCtrl+Alt+Delkeycombinationtoendallprocessesofthetarget,andthendelete.

Howtodeletestubbornfiles(folders)

Generalmethodstodeletestubbornfiles

Method1:AfterrestartingtheWindowsoperatingsystem,deletethefilesintheusualway.

Method2:IntheDOS(orcommandprompt)interface,useDel,Deltreeandothercommandstodelete.

Method3:Useathird-partytoolotherthanWindowsExplorertodelete,suchasTotalCommander,acdsee,FlashFXP,neroandothersoftwarewiththefunctionofbrowsingfolders.

Method4:Ifyouhaveinstalledmorethantwooperatingsystems,youcandeletethefilesofotheroperatingsystemsinthecurrentsystem.

Method5:PresstheF8keyduringstartuptoselectthesafemodeandexecutethedeleteoperation.

Thebestwaytouse

Deletefilesthatare"usedbyotherprograms"

Problemperformance:b>

InWindowsXPsystem,Iamgoingtodeletealarge-capacityAVIformatfile,butthesystemalwayspromptsthatthedeletionoperationcannotbeperformed,andthereareotherprogramsinuse,evenwhenyoujustbootintotheWindowssystem..

Problemsolving:

Method1:OpenNotepad,clickonthemenubar"File"→"Saveas",Thenamedfileisthesameasthefilenameyouwanttodelete(includingtheextension),andthenreplaceit,youwillfindthatthecapacitybecomes0KB.Atthispoint,justexecutethedeletecommand.

Method2:CreateanewfolderinthesamedirectoryoftheAVIfile,andthenrestart.Don'tselecttheAVIfile,firstselectthenewlycreatedfolder,andthenpresstheCtrlkey+theAVIfileatthesametimetoexecutethedeleteoperation.

Method3:ChangetheextensionoftheAVIfiletoanyotherinvalidfiletype,andthenperformthedeleteoperation.

Method4:ThereisaonceandforallmethodistodisablethemediapreviewfunctionofWindowsXP,click"Start"→"Run",enter:"CMD"andpressEnter.Thenenterinthe"CommandPrompt"window:regsvr32/ushmedia.dll

Afterconfirmingtheoperation,thepreviewfunctionofthevideofilewillbeuninstalled.Whenyouneedtorestorethevideofilepreviewfunctioninthefuture,enterthecommandregsvr32shmedia.dllinthe"CommandPrompt".

Method5:StartthemediaplayerthathasplayedthatAVIfile,andopenanotherfile.Afterthat,trytodeleteitagain.

Method6:Youcanusethewinrarprogramtodelete,right-clicktheAVIfile,select"Addtocompressedfile"inthepop-upmenu,andthenclickthe"General"inthepop-upwindow.Inthetabpage,selectthe"Deletesourcefilesaftercompression"checkbox.Afterconfirmingtheoperation,performthecompressionoperation.Finallydeletethecompressedfile.

Method7:Bringupthe"WindowsTaskManager"andchoosetoendtheExplorerprocessinit,butdonotclosethewindowatthistime.Atthistime,therewillbeasituationlikeacrash.Weswitchtothe"Applications"tab,clickthe"NewTask"button,enterExplorer.exeandconfirmtheoperation.Afterthat,thedesktopisbacktonormalagain,andyoucandeleteitagain.

Cleverlydelete"non-emptyfolders"or"badfiles"

Problemperformance:

UnderWindowsXPsystem(NTFSpartitionformat),thespecifiedfilecannotbedeletedeitherintheExplorerorusingathird-partytool.Forexample,ifyoudeleteitwithTotalCommander,youwillfirstbepromptedthatthefolderisnotempty,andtherewillbenoresponseafterconfirmation.EvenifyoustartwithaDOSdiskandloadthereadableandwritableversionofntfsfordospro,itcan'tbedeleted.Thepromptsays"badfilename",butyoucanseethefolder.

Problemsolution:

Inthiscase,thefilecannotbedeletedisprobablyduetothelongfilenameintheNTFSformat.Wecanusethe8.3formattoreducethelengthorchangepartofthedirectorynameinthepathtoreducethelengthofthepath.Forexample,youcantemporarilyrenamesomedirectoriesinthepath,orusethe8.3formatinthecommandlinemode.Forexample,the"LinuxFaq"directorybecomes"LINUXF~1"whenitbecomes8.3.Youcanenterthedirectorythrough"Linuxf~1",andthenyoucanusetheDelcommandtodeletethespecifiedfile.Ifyouneedtodeleteadirectory,usetheRdcommand.

Cleverlydeletethe"specifiedprogramorfileinuse"file

Problemperformance:

Whendeletingafile,thesystempromptsawarningmessagethatthespecifiedprogramorfileisinuseandcannotbedeletedinapop-updialogbox.

Problemsolving:

Method1:Forthiskindofsituation,wecanendtherelatedprocessofpre-deletingfiles.Solvetheproblem.So,howcanIknowwhichprocessesaspecifiedfileisassociatedwith?YoucanusetheWhoLockMesmalltooltofindout.Werun"Install.exe"toinstalltheprogramfirst.

Next,enterthedirectorywherethepre-deletedfileislocated,right-clickthefilewiththemouse,andselect"WhoLockMe?"inthepop-upmenu.

Atthistime,the"Lockers"windowwillpopup,inwhichwecanlearnallthecurrentprocessesthatcallthefile.

Afterselectingtheprocessname,clickthe"KillProcess"button,andthe"Kill-Confirmation"dialogboxwillpopup.Clickthe"Yes"buttonheretoconfirmtheendoftheprocess.Afterfinishingallthecorrespondingprocesses,thespecifiedfilecanbedeletedthroughthenormalway.

Tips:Infact,thismethodisespeciallysuitablefordeletingTrojanhorseservers.ThisextremelythreateningXiaodongdongcanonlybedeletedafterblockingallprocessesrelatedtoit.

Method2:IftheDLLdynamiclinklibraryfilecalledbythespecifiedprogramorfileisstillnotreleasedinthememory,itwillalsopromptthatthefileisinusewhenitisdeleted.Inthiscase,wecandeletethepagefileofthesystemintheDOSenvironment.Thefile"WIN386.SWP"intheWindows9Xsystem(locatedintheWindowsdirectoryofthesystemdisk)isthefile"pagefile.sys"intheWindows2000/XPsystem.(Locatedintherootdirectoryofthesystemdisk).

Method3:Ifavirusfirewallresidesinthesystem,anditischeckingthefilesyouaregoingtodeletewhenscanningforviruses,thesystemwillalsopromptthatthefilesareinuse.Atthispoint,weonlyneedtosuspendthereal-timemonitoringoperation.

Cleverlydeleteothertypesofstrangefiles

Situation1:Userpermissionproblemsmakeitimpossibletodeletefiles.IfthecurrentWindowsuserTheloginidentitydoesnothavetheauthoritytodeletethespecifiedfile/folder(forWindowsNT/2000/XP/2003operatingsystem),justloginasanadministratoragain.

Case2:Illegalcharacterscausefilesorfolderstobedeleted

Ifthefilesorfolderscannotbedeletedduetoillegalcharacters,youcanclickInthe"Prompt"interface,enterthedirectoryofthefiletobedeleted,enter"dir>del.bat",usetheDOSpipelinecommandtoautomaticallyenterthefilelistofthecurrentdirectoryintothebatchcommandfile"del.bat",andthenmodifythebatchCommandfile,onlykeepthefileordirectoryname,andadd"del"or"rd"beforethefileordirectoryname,andthenrunthebatchcommandtodelete.

Case3:Unabletodeleteanyfilesinthesystem

Checkwhetherthereisanundeleteprotectionsoftwareinstalledinthesystem,andifso,removeitJustdeleteit.

Istillcan’tdeleteit,whatshouldIdo?

Ifnoneoftheabovemethodswork,youcancutotherfilestootherdisks,andthenformatthisdisk.

Other

Ifyouwanttodeleteafilecompletely,(thatis,eraseitsdatainthedataarea),itisrecommendedtousesoftware.Theprincipleistocreatemultipletemporaryfilesinthesamepartitionanddelete(orreadandwritemultipletimes)tooverwritetheirdata.Thiskindofdeletionmethodbelongstophysicaldeletion,andthereisnowaytorecoverafterphysicaldeletion.Suitableforveryconfidentialdocuments.Forphysicaldeletionandlogicaldeletion,pleaserefertotheencyclopediaoftheworddeletion,whichwillnotberepeatedhere.

Latest: Chemical synapse

Next: Computer Application Technology