How to delete a non-existent file. Removing pages from the search engine index

There are often situations when a system administrator has to manually remove a domain controller from Active Directory. Such situations arise when a server with the role of a domain controller physically fails or another emergency situation occurs. Naturally, it is most preferable to remove the domain controller using the DCPROMO command (details). However, what to do if the domain controller is unavailable (turned off, broken, inaccessible over the network)?

Of course, you can't simply delete a domain controller account using the Active Directory User and Computer snap-in.

In a domain running Windows Server 2008 or later, when you remove the computer account of a failed domain controller using the ADUC console (Dsa.msc), AD metadata is automatically cleaned up. And in general, no additional manual manipulations described below need to be performed.

To manually remove a domain controller from Active Directory, the NTDSUTIL utility is suitable. NTDSUTIL is a command line utility that is designed to perform various complex ActiveDirectory operations, including Active Directory maintenance, management, and modification procedures. I already wrote about using Ntdsutil for .

The following instructions will allow you to manually remove a failed domain controller.

Note: When using NTDSUTIL, it is not necessary to enter the entire command; it is sufficient to enter information that allows you to uniquely identify the command, for example, instead of typing metadatacleanup, you can dial metcle, or mc

  • Open a command prompt
  • Dial ntdsutil

    (all subsequent commands will be entered in the ntdsutil context)

  • metadata cleanup
  • connections
  • Type connect to server

    Where — the name of the functional domain controller, the master of operations

  • quit
  • select operation target
  • list sites
  • select site<#>

    Where<#>- where is the number of the site in which the faulty domain controller was located (the list sites command will display the site number)

  • list servers in site
  • select server<#>

    Where<#>-where – the number of the faulty domain controller (the list servers command will display the server number)

  • list domains
  • select domain<#>

    , Where<#>number of the domain in which the faulty DC is located (the list domains command will display the domain number)

  • quit

    (back to the metadata cleanup menu)

  • remove selected server

    (a warning window will appear, make sure that the domain controller you are looking for is being removed)

  • Open the Active Directory Sites and Services console
  • Expand the site where the unnecessary DC was located
  • Check that the given controller does not contain any objects
  • Right click on the controller and select Delete
  • Close the Active Directory Sites and Services console
  • Open the Active Directory Users and Computers snap-in
  • Expand OU "Domain Controllers"
  • Remove the computer account of the failed domain controller from this OU
  • Open the DNS Manager snap-in
  • Find the DNS zone for which your domain controller was the DNS server
  • Right click on the zone and select Properties
  • Go to the servers tab Name Servers
  • Delete the faulty DC entry
  • Click OK to delete all remaining DNS records: HOST (A) or Pointer (PTR
  • Make sure there are no DNS records left in the zone associated with the remote domain controller
  • That's it, we have completely removed the faulty domain controller and all resources associated with it from DNS and Active Directory.

    On Windows of any version (XP, 7, 8, 10), a problem often arises when a file or folder with a locked file is not deleted. A message pops up that the file is occupied by another process or is open in some program, or you need to ask permission from someone.

    There are several ways to delete a file that is not deleted, renamed, or moved. This is done without additional software, using the free Unlocker program, from a bootable flash drive or LiveCD, or the DeadLock program.

    When deleting locked files and folders, be careful; it may be part of the operating system. Without them, Windows will stop loading.

    Why isn't it deleted?

    • The file is open in another program. Terminate any unnecessary processes and try again. Sometimes restarting the computer helps.
    • Insufficient permissions to delete. For example, this file was created by another user or the computer administrator removed the deletion rights.
    • Exceptions

      The methods described in the article will not always help:

      • pagefile.sys and swapfile.sys - to remove, disable the swap file.
      • hiberfil.sys - deleted when hibernation mode is disabled.
      • If an access denied message appears. You need to become the owner of the file or folder. The easiest way to do this is with the TakeOwnershipPro program.
      • If a message appears asking permission from TrustedInstaller. This is protection against the removal of system components.
      • Windows.old - folder with the old version of the operating system. It is deleted through the “Properties” of the local drive C. On the General tab there is a “Cleanup” button. A window will open in which select “Clean up system files.” Once the analysis is complete, the “Previous Windows installations” item will appear in the list in this window. Check this box and click OK.

      Deleting the file manually

      Message: The file is already in use, please close and try again.

      If a file doesn't want to be deleted, the error message usually tells you which process has locked it. This could be explorer.exe or any program that has it open. If you close this program, the file will be deleted.


      If the file is occupied by the explorer.exe process

      • Before completing the task, open Command Prompt as an administrator. It is located in “Start - All Programs - Accessories”. Right-click on Command Prompt and select Run as Administrator.
      • Remove the explorer.exe task in the task manager and write del full_path/name.extension in the command line.
      • The path does not have to be entered manually. Right-click on the desired file while holding Shift - Copy as path, and paste it into the command line through the right-click context menu.
      • Now restart explorer.exe. In the task manager, click "File - New task - explorer.exe".

      Use a bootable USB flash drive or disk

      If you have a bootable USB flash drive or LiveCD, or a Windows recovery disk, run them and calmly delete the file using the standard method or through the command line.


      Be careful, sometimes when logging in through the boot disk, the local drives have different letters. To see a list of folders on drive C, type dir c: on the command line.

      If you use a bootable USB flash drive or Windows installation disk, the console opens at any time after the language selection stage, using the key combination Shift + F10.

      You can also select the system recovery mode, which will be offered before starting the OS installation.

      Command for deleting via the console: del full_path_to_the_file.

      Using DeadLock

      The free DeadLock program allows you to delete a locked file and change the owner. Download from the official website: https://codedead.com/?page_id=822.

      Using the File menu, add the problematic file to the program. Right-click on it in the list - unlock it (Unlock) and delete it (Remove).


      Using Unlocker

      The simplest and most popular program, but now even on the official website a warning about unwanted software is displayed. Along with the program, there may be some other virus or advertising, so use at your own peril and risk. Try the methods above first. Website: http://www.emptyloop.com/unlocker/.

      After installation, a new item will appear in the context menu, which is called Unlocker. After clicking the button, the program will complete the interfering process and the file will be unlocked.


      If you want to delete a folder, first delete all its contents.

      Via command line

      There was such a case that the file did not want to be deleted in any way. The size was 0 bytes, the name was written in Russian letters (not supported in older versions of MS-DOS), there was a Read-only attribute and an A attribute (only reading and adding content). The command line helped.


      That's all for now. If you know simpler and more effective ways, write them in the comments. Which method helped you?

    It happens that you simply need to delete a folder or file, but Windows does not allow you to do this and writes about errors like “this process is busy” or “the folder is not empty” or something else. Maybe you found some folder or file that you “didn’t like” and want to delete it. Maybe you know for sure that this is “unnecessary junk” that only takes up space, but Windows curses and does not allow it. In general it's not that important Why can't I delete it?, How many How to remove and in this article you will find answers to this question.

    Most often, such situations occur due to the fact that the files being deleted are occupied by other programs. But it also happens that it is impossible to delete a file even after closing all applications that can use this file. For example, a file or folder may become locked due to incorrect user actions and cannot be deleted in any way. These folders (files) remain “hanging” on the hard drive, take up space, and are not opened or deleted.

    The file may not be deleted due to a failure that occurred during the process of writing or overwriting it. If you interrupt the recording process, the file is not completely saved, resulting in invalid entries in the file system. And our beloved Windows, not knowing how to handle it, simply closes access to it, supposedly for security reasons.

    So, let's start dancing with a tambourine!

    Why is the file not deleted?

    1) The file was blocked by an antivirus program. This often happens when an antivirus quarantines a file. Or the antivirus detected a malicious program, but treatment was postponed (waiting for its databases to be updated). In this case, in order to avoid infecting the computer, the user is blocked from accessing this file. Check the quarantine of your antivirus program and delete the file using the antivirus itself, or disable the antivirus and delete the file manually.

    2) The file is being used by another program. Think about what programs might use this file. Close them and try deleting the file again. If this doesn't help, use Task Manager to check the process list to see if the program is still running.

    3) Administrator rights are required to delete a file. If you are running under a user account, log in again as an administrator and try deleting the file.

    4) The file is being used by another user on the local network. Please wait and try deleting the file later.

    5) The file is being used by the system. Try deleting the file after restarting your computer or in safe mode.

    6) The device is write protected. For example, SD memory cards and some USB flash drives have a special switch to lock the device.

    There are several removal methods, I will start with the simplest and most effective ones and gradually move on to more complex ones.

    1. Method:

    Reboot

    We programmers have a saying: “7 troubles - one reset.” You can figure out what it means yourself

    But the point of the method is that you need to restart the computer and try to delete the file/folder again.

    2. Method:

    Safe Mode

    You need to log in in Safe Mode.

    What is the benefit of booting the system in safe mode? The thing is that Windows does not load its libraries to execute dialogs. To put it simply, if you have a virus on your computer (and this is possible), then in this safe mode it will not perform any actions. In this mode there is nothing superfluous, just a clean OS and a person.

    In order to enter this mode, when you turn on the computer and after loading the BIOS (or in general you can from the very beginning of the “black screen” boot), press the key intensively without ceasing F8(no need to press and hold!!!). A black screen will appear in which you need to use the keys on the keyboard to select Additional boot options, and then Safe Mode (or just Safe Mode, you don’t need to select all sorts of things with command line support and so on. And that will do) and press Enter. If you did everything correctly, the system will boot and in the lower right corner there will be an inscription Safe Mode (it may also be in all corners). Don't be afraid of the black screen that will appear) without wallpaper and beauty.

    Now you need to find the file that you just couldn’t delete and try to delete it. In any case (it worked or not), reboot.

    3. Method:

    Through the Unlocker program

    It is precisely for such purposes that the good guys wrote such a program called Unlocker. This is a very small, free program for unlocking files running on Windows. This utility allows you to close open file blockers, thereby making it possible to perform further actions on these files. Those. the program shows all processes blocking a file (folder) and can delete it, despite all the blockers.

    In addition, the program allows you to rename files and their extensions or move a locked file to another location. This is also very convenient, because... Windows does not always allow you to do this quickly and calmly.

    When installing, DO NOT agree to the proposed toolbar (or you really need it, then click Next) and uncheck Install Babylon Toolbar - RECOMMENDED. Otherwise, the installation is normal - everywhere Next I Accept Install and that’s it)

    Just right-click on the file that is not being deleted (not moved/renamed) in the usual way and select the program icon from the menu. A window should appear in which you select Delete from the list and press the button OK.

    If the file or folder is blocked, another window will appear. First you need to press the button Unlock everything and then Delete.

    For those who don’t know what the bit depth is on the system, read

    4. Method:

    Through file managers

    Of all the most popular and frequently used file managers, the most popular is Total Commander.

    File managers have the ability to bypass some Windows restrictions, which we will use.

    To delete a non-deletable file, we will need to download one of these file managers, FAR or Total Commander (I use Total Commander Podarok Edition). After downloading and installation, find your file in the list of directories and delete it by clicking either the right mouse button and selecting Delete, or pressing the Delete key on the keyboard.

    These managers also have a good opportunity to see everything that is hidden and encrypted (especially in different colors, like mine). If your folder is not deleted, then go into it through the manager and see what’s there. If you see a hidden file, it means it is interfering. Then launch Task Manager ( ctrl+shift+esc), go to the Processes tab and look for this file in the list (it’s also a good idea to click on the button at the bottom left of the Display the processes of all users manager), find and finish (del or RMB -> End process or the End process button in the lower right corner). The application is the same with files, we look for the file name and “kill”.

    5. Method:

    Another option with Unlocker

    If your folder is not deleted, it says something like “the folder is not empty,” then create a new folder on the same disk, transfer the non-deletable folders to the new folder, delete the new folder using Unlocker

    6. Method:

    Using startup

    Click “Start” => “Run” => In the “Run” line, enter msconfig => Click OK. You will see the System Setup window. Go to the “Startup” tab and in the list of downloadable items, find a name similar to your “not deleted” file.

    If there is no such file in the list, then click on the “Disable all” button. Click on the “Apply” => “Close” button. The operating system will issue a warning that all changes made by the system setup program will take effect only after rebooting the computer. Click the "Reboot" button. The computer will restart. After downloading, try deleting the “undeletable” file again.

    7. Method:

    Using System Restore

    In the “System Settings” window (which was the same as in the previous paragraph), select “General”. Click on the “Run System Restore” button. In the window that appears, select the option “Restore the computer to an earlier state”, click “Next”. In a new window, you will see a calendar in which you can select a system restore date. Select a date when the "not deleted" file was not on the computer. Click the "Next" button. Don't worry, System Restore will not affect your personal files.

    8. Method:

    Lack of access rights to delete files

    Right-click on the problematic object and select "Properties" from the drop-down list

    In the window that opens, select the “Security” tab

    Highlight your name in the list and select "Full Control"

    - “Apply” and “OK”

    Trying to delete

    9. Method:

    Use a different operating system.

    Try booting from a removable disk (or CD/DVD) (LiveCD or LiveUSB) with a different operating system. Then delete the file/folder.

    10. Method:

    Move somewhere.

    Sometimes it helps to move (cut) the folder to an empty flash drive and then format it.

    11. Method:

    In the window, type the command chkdsk c: /f/r and click Enter, it should be taken into account that c: is the name of the disk that needs to be checked. If the drive you are checking has a different letter, then write it.

    If the drive being checked is C:, then when you press Enter You will be prompted to check it the next time you reboot. When asked whether to check or not at the next reboot, enter Y and press Enter.

    If the disk name is different, the scan will begin immediately. At the end of the check, the result of the check will appear. Type exit and click Enter.

    Now you can delete a file that you did not want to delete. In the case of drive C, simply restart the computer and after checking, delete the non-deletable file.

    12. Method:

    If you open the command line via Start - All Programs...run the process as an administrator (RMB and Run as Administrator) and move to the folder with the non-deletable file (or folder) using the cd \ command in order to be in the root directory disk, and then cd folder_name to go to the desired folder.

    Hello! Today is a post about a painful issue for most novice website builders. I had to answer the same question very often in the comments - how to remove pages from search, which were previously indexed, but due to circumstances were deleted and no longer exist, but are still in the search engine index. Or the search contains pages that are prohibited from indexing.

    You can’t really expand on the comments, so after the next question I decided to give this topic special attention. First, let's figure out how such pages could end up in searches. I will give examples based on my own experience, so if I forget something, please fill it in.

    Why are closed and deleted pages in search?

    There may be several reasons, and I will try to highlight some of them in the form of a small list with explanations. Before we begin, I will explain what I mean by “extra” (closed) pages: service or other pages prohibited from indexing by rules or meta tag.

    Non-existent pages are searched for the following reasons:

    • The most common thing is that the page has been deleted and no longer exists.
    • Manual editing of a web page address, as a result of which a document that is already in the search becomes unavailable for viewing. Particular attention to this point should be given to beginners who, due to their little knowledge, neglect the functioning of the resource.
    • Continuing the thought about the structure, let me remind you that by default, after installing WordPress on the hosting, it does not meet the requirements of internal optimization and consists of alphanumeric identifiers. This is due to CNC, and a lot of non-working addresses appear, which will remain in the search engine index for a long time. Therefore, apply the basic rule: if you decide to change the structure, use 301 redirects from old addresses to new ones. The ideal option is to complete all the site settings BEFORE opening it; a local server can be useful for this.
    • The server is not configured correctly. A non-existent page should return an error code of 404 or 3xx.

    Extra pages appear in the index under the following conditions:

    • The pages, as it seems to you, are closed, but in fact they are open to search robots and are searched without restrictions (or robots.txt is not written correctly). To check the PS access rights to pages, use the appropriate tools for.
    • They were indexed before they were closed in available ways.
    • These pages are linked to by other sites or internal pages within the same domain.

    So, we figured out the reasons. It is worth noting that after eliminating the cause, non-existent or extra pages may remain in the search database for a long time - it all depends on the frequency of visits to the site by the robot.

    How to delete a page from the Yandex search engine

    For removing URLs from Yandex Just follow the link and insert the address of the page that you want to remove from the search results into the text field of the form.

    The main condition for a successful deletion request:

    • the page must be closed from indexing by robots rules or the noindex meta tag on this page - if the page exists but should not participate in the search results;
    • when trying to access a page, the server should return a 404 error - if the page has been deleted and no longer exists.

    The next time a robot crawls the site, deletion requests will be completed and the pages will disappear from search results.

    How to remove a page from Google search engine

    To remove pages from, proceed in the same way. Open Webmaster Tools and find the Remove URLs option in the Optimization drop-down list and follow the link.

    We have a special form with which we create a new deletion request:

    Click continue and follow further instructions to select the reason for deletion. In my opinion, the word “reason” is not quite suitable for this, but that’s not the point...

    Of the options presented to us, we have:

    • removing a page page from Google search results and from the search engine cache;
    • removing only the page from the cache;
    • deleting a directory with all addresses included in it.

    A very convenient function for deleting an entire catalog, when you have to delete several pages, for example from one category. You can monitor the status of your deletion request on the same tools page with the option to cancel. For successful removing pages from Google the same conditions are required as for . The request is usually completed as quickly as possible and the page immediately disappears from the search results.

    Hi all! Today I will tell you Howdelete a file or folder that cannot be deleted in different ways, in case you have already tried everything you could, but it still didn’t help. I decided to write this article because I myself once encountered a similar problem, that my design themes that were in the folder did not want to be deleted or moved. Why, they couldn’t even be opened or renamed.

    Often when PC users try to delete such files, The following messages may appear: the file cannot be deleted, access is blocked, the disk may be full or write-protected, the file is occupied by another application, this process is busy, the folder is not empty. These errors occur for many different reasons, which you must first understand and understand what the problem may be before you try to do anything. So, there are not many reasons for this, here are some of them:

    — You are trying to delete a file that is used by other programs. For example, if you were watching a movie or listening to music, but before you had time to close the player, you are already trying to delete the file being played, then no matter how hard you try, you will not be able to do this until you close all the corresponding applications that use this file in the PC ( personal computer). It also sometimes happens that this file or folder is used by other applications, but you do not see them, although they are displayed in the task manager, which will be discussed below.

    — You are trying to delete a file that is used by other users. For example, you downloaded it through a torrent tracker and then wanted to delete it, but for some reason it just doesn’t want to be deleted. The thing is that another user is downloading this game from you over the Internet, and until you turn off the Internet or exit the torrent program, the file will not be deleted.

    -You don't have enough rights to do this. What does this even mean? Am I the owner of my computer or who? The fact is that you probably, like me once, could have placed your files or folders in folders of the Windows operating system, to which access is denied for your own safety. This restriction was created to prevent you from ruining your computer by deleting some important file from the Windows operating system.

    — Files or folders that you wanted to delete were quarantined by your antivirus program. In other words, your antivirus program didn’t like something about them, so it blocked them so that they could not harm your PC in any way.

    Ok, we figured out the reasons. Now all that’s left for you to delete your non-deletable file is to simply try all the methods that I described for you below.

    How to delete a file or folder that cannot be deleted via a computer?

    Method 1. Just restart your computer, in most cases this will be enough.

    Method 2. Turn on task manager. Press Ctrl + Alt + Delete if you have Windows 7 or XP and Windows + X if you have Windows 8. A window will appear in front of you, go to “processes”.

    All programs that are currently running on your computer will be displayed here. Try to find exactly the one that might use your file. If it doesn’t work, then just select any one at random and click “end process” each time trying to delete the file again.

    Method 3. Turn off your computer and turn it on again. During the boot process, press the F8 key many times. A black screen will appear in front of you, where there will be several options to boot your PC. Select "safe mode". As soon as the computer boots, try to delete the file or at least move it to another location.

    Method 4. If the file is simply not deleted, but can be transferred, then you can proceed as follows. Just drag your file onto an empty flash drive and format it. Be careful, after this process everything will be deleted from it!

    Method 5. Open your computer and find your non-deletable file on the desktop. At the top of the window, click “service”, then “folder options”, go to the “view” tab and uncheck the box if it is next to “use simple file sharing” and save the changes. Try deleting your file or folder.

    Method 6. Change administrator rights. Right-click on our file, select “property”, then in the window that opens “security” and click “advanced”.

    Another window will appear, click on “owner”. Here simply select another administrator and click “apply”. Personally, this operation helped me remove restrictions from my WordPress templates, which I wrote about.

    Method 7. Disable all processes associated with this file. This procedure is very similar to the task manager, but it has a more effective effect. Click "start" on your desktop, then "run". In the window that appears, enter msconfig and press OK.

    Another window will appear in front of you. Here go to the “startup” tab and in the list of running processes try to find the name of your non-deletable file and uncheck it, and click ok.

    How to delete files and folders that cannot be deleted using special programs?

    Method 8. To solve this problem, a very cool and at the same time simple program “UnLocker” was created a long time ago, which is capable of deleting files that cannot be deleted in 90% of cases. You can download the program from the official website. During the installation process, be careful and uncheck the box where you are offered to install another application in addition to the program. If you don’t do this, then at the end of the installation your antivirus program will swear for a long time.