Ошибка the system cannot find the path specified

RRS feed

  • Remove From My Forums
  • Вопрос

  • Необходимо очистить папку от файлов использую самую простую команду del D:folder*.* /s/q . На одном сервере работает а на втором выдает ошибку. Серверы идентично настроены, путь правильный. Командой
    СD заходит в папку. Как исправить ?Мне кажется, что чем дальше, тем операционные системы менее надежные.

Ответы

  • На втором диске все
    нормально, поэтому пока так
    и
    сделал чтобы лог писался
    в папку на другом диске

    • Помечено в качестве ответа
      Vector BCOModerator
      11 февраля 2016 г. 11:30

Все ответы

  • Временно  PowerShell
     
    Get-Childitem D:folder*.* -Recurse | Out-File C:SCRIPT1.txt | Remove-Item

    • Помечено в качестве ответа
      momiko_misha
      29 января 2016 г. 22:22
    • Снята пометка об ответе
      momiko_misha
      29 января 2016 г. 22:22

    • Нет скорее проблема в Виндовс, в выполняется скрипт в Power Shell , папку очищает но не может записать данные в лог файл и та сама ошибка the
      system cannot find the path specified.
      Система чистая, ошибок нет.
  • В вашем конвейере  сначала идет dir потом запись в файл и потом удаление непонятно чего ибо по конвейеру передалось ровно ничего, в лучшем случае имя файла 1.txt а не результат вывода get-childitem. Если нужно с логом
    то это пишется по другому

    $ListFile = Get-ChildItem D:folder -Recurse
    foreach ($File in $ListFile) {
        $Error.Clear()
        Remove-Item $File.fullname -Force
        if (!$Error) {
            $File.fullname >> C:SCRIPTdelete_log.txt
      }
     else {
           $Error[0].CategoryInfo >> C:SCRIPTdelete_log.txt
     }
    }
    • Изменено
      NTLose
      30 января 2016 г. 22:11

  • Может в данной папке есть очень длинные пути к файлам (больше 256 символов)?

  • или права стоят не позволяющие удалить файлы


    The opinion expressed by me is not an official position of Microsoft

  • Первая строчка записывает в файл что будет удалять а вторая удаляет, все очень быстро

    Get-Childitem D:ProjectsSCAN*.* -Recurse | Out-File C:SCRIPTclean_scaning.txt | Remove-Item 
    Get-Childitem D:ProjectsSCAN*.* -Recurse | Remove-Item 

  • Как бы не так! =)
    Первая выводит в файл список файлов рекурсивно, если есть права конечно, при этом удаление не отработает ибо по конвейеру не передан массив объектов System.IO.FileInfo, все закончится на выводе в файл =)
    Вторая независимо от первого списка пытается удалить. А вот что она удалит этого никто не знает, тут все зависит от прав и всяких непредвиденных ситуаций а-ля занят ли файл и все такое. Поэтому одно с другим никак не коррелируется. Я же привел
    работающий скрипт с логгированием. Не работает?

    Можно еще узнать сколько удалилось в места (тут в килобайтах)

    $LogFile = C:SCRIPTclean_scaning.txt
    $DeletePath = D:ProjectsSCAN
    $ListFile = Get-ChildItem $DeletePath -Recurse
    $i = 0
    foreach ($File in $ListFile) {
        $Error.Clear()
        $i += ($File.Length) /1KB
        Remove-Item $File.fullname -Force
        if (!$Error) {
            $File.fullname >> $LogFile
      }
     else {
           $Error[0].CategoryInfo >> $LogFile
     }
    }
    $i >> $LogFile

    • Изменено
      NTLose
      31 января 2016 г. 17:38

  • Путь очень короткий, права полные здесь в этом не может быть проблем (здесь все проверено) на другом и командной строки и

    PowerShell 
    с работает. С длинным путем более 256 действительно есть проблемы на этом сервере (путь длинный и кириллические буквы) об этом я писал в другом посте но также бы хотел решить данную проблему.

  • https://social.technet.microsoft.com/Forums/ru-RU/7c8fbc2e-b542-4f28-b1f2-a30ac2b24d79/-?forum=WS8ru

  • Что не так конкретно сейчас? Не вполне понятно =/ Приложенный мною скрипт не работает? Ваш скрипт не работает? Что не удаляется?

  • Покажите пожалуйста на скриншотах что конкретно не отрабатывает, потому как складывется впечатление о непонимании друг друга (только пути не затирайте, так как в этом может быть загвоздка)

    Смотрите еще на похожие буквы в разных раскладках «О» (русская раскладка) не равна «O» (английская раскладка), ошибка может быть как в имени файла или каталога, так и в написании скрипта

    Так же пути с пробелами нужно заключать в скобки, например

    CD C:Program files попытается зайти в C:Program
     а такого пути нет, свою очередь CD «C:Program files»
    отработает корректно


    The opinion expressed by me is not an official position of Microsoft

  • Необходимо очистить папку от файлов использую самую простую команду del D:folder*.* /s/q . На одном сервере работает а на втором выдает ошибку. Серверы идентично настроены, путь правильный. Командой
    СD заходит в папку. Как исправить ?Мне кажется, что чем дальше, тем операционные системы менее надежные.

    Проверьте, что System Locale на обоих серверах одинаковые (Control panel — Region — закладка Administrative).

  • В том и проблема что не работает.

    • Изменено
      momiko_misha
      1 февраля 2016 г. 19:44

  • Проверил региональные настройки и другие настройки идентичны

  • del D:folder*.* /s/q  не работает  del
               D:1*.* /s/q  работает

  • Значит folder не folder как бы странно это не звучало =) Проходили такое уже) Переименовывайте полностью имя! При чем валидной локалью и ЛИЧНО убедившись что то откуда вы переименовываете все ок и раскладками и с локалями.

    А если туда наоборот создать что-то?

    echo 1 > D:foldertest_rw.txt

  • В первую очередь так проверял echo
    так все работает :-) . Буду устанавливать все критические обновления на сегодняшний день может поможет.

  •  System Locale на обоих серверах одинаковые (Control panel — Region (Региональные стандарты)
    закладка Administrative (
    Дополнительно) — Юникод (Текущий язык програм) -Украина . На проблемном
    сервере сменил на -Россия. Проблема пропала.Учитывая рост файловых систем хотелось чтобы Windows 2012 R2 

    1) Без прибегания сторонних утилит мог работать с длинными путями

    2) Чтобы не было таких явно не определенных проблем

    После этого все перечислены скрипты и команды начали корректно работать всем спасибо.

    • Помечено в качестве ответа
      momiko_misha
      4 февраля 2016 г. 22:09
    • Снята пометка об ответе
      momiko_misha
      5 февраля 2016 г. 9:09

  • Установилобновление,послеперезагрузкипроблемасновапроявиласебя, так что невэтомдело,
    даже не
    знаюкакисправитьситуацию.
    Может выпустят
    какое-то обновление, потому система
    работает как часы никаких
    ошибок нет.

    • Изменено
      momiko_misha
      5 февраля 2016 г. 9:19

  • Переименовывать эту папку в тоже самое пробовали?

  • Пробовал переименовывать
    то же, только когда папка
    называется
    исключительно из цифр .Тогда
    скрипты работают.

  • На втором диске все
    нормально, поэтому пока так
    и
    сделал чтобы лог писался
    в папку на другом диске

    • Помечено в качестве ответа
      Vector BCOModerator
      11 февраля 2016 г. 11:30

  • Такое впечатление
    что Windows 2012 R2  нужно дорабатывать
    и дорабатывать.

There is not only 1 %SystemRoot%System32 on Windows x64. There are 2 such directories.

The real %SystemRoot%System32 directory is for 64-bit applications. This directory contains a 64-bit cmd.exe.

But there is also %SystemRoot%SysWOW64 for 32-bit applications. This directory is used if a 32-bit application accesses %SystemRoot%System32. It contains a 32-bit cmd.exe.

32-bit applications can access %SystemRoot%System32 for 64-bit applications by using the alias %SystemRoot%Sysnative in path.

For more details see the Microsoft documentation about File System Redirector.

So the subdirectory run was created either in %SystemRoot%System32 for 64-bit applications and 32-bit cmd is run for which this directory does not exist because there is no subdirectory run in %SystemRoot%SysWOW64 which is %SystemRoot%System32 for 32-bit cmd.exe or the subdirectory run was created in %SystemRoot%System32 for 32-bit applications and 64-bit cmd is run for which this directory does not exist because there is no subdirectory run in %SystemRoot%System32 as this subdirectory exists only in %SystemRoot%SysWOW64.

The following code could be used at top of the batch file in case of subdirectory run is in %SystemRoot%System32 for 64-bit applications:

@echo off
set "SystemPath=%SystemRoot%System32"
if not "%ProgramFiles(x86)%" == "" if exist %SystemRoot%Sysnative* set "SystemPath=%SystemRoot%Sysnative"

Every console application in System32run directory must be executed with %SystemPath% in the batch file, for example %SystemPath%runYourApp.exe.

How it works?

There is no environment variable ProgramFiles(x86) on Windows x86 and therefore there is really only one %SystemRoot%System32 as defined at top.

But there is defined the environment variable ProgramFiles(x86) with a value on Windows x64. So it is additionally checked on Windows x64 if there are files in %SystemRoot%Sysnative. In this case the batch file is processed currently by 32-bit cmd.exe and only in this case %SystemRoot%Sysnative needs to be used at all. Otherwise %SystemRoot%System32 can be used also on Windows x64 as when the batch file is processed by 64-bit cmd.exe, this is the directory containing the 64-bit console applications (and the subdirectory run).

Note: %SystemRoot%Sysnative is not a directory! It is not possible to cd to %SystemRoot%Sysnative or use if exist %SystemRoot%Sysnative or if exist %SystemRoot%Sysnative. It is a special alias existing only for 32-bit executables and therefore it is necessary to check if one or more files exist on using this path by using if exist %SystemRoot%Sysnativecmd.exe or more general if exist %SystemRoot%Sysnative*.

Are you currently seeing a “the system cannot find the path specified» error on your Windows computer? There are many other reasons you see this message, from simple mistakes such as typing a wrong path on your Command Prompt or a program installation failure.

However, it could also mean that there are registry problems in your system, such as invalid keys or, worse, a virus attack. That’s why if you see this error, don’t take it lightly. Here are eleven fixes you can do to solve this problem right away.

1. Run Command Prompt as an Administrator

Windows utilities cannot access all files and folders available on your device. Administrative privileges are required to access specific system files. Thus, if you attempt to access a file or folder path that Command Prompt is not permitted to access, this error may occur. To rule out this possibility, you must grant Command Prompt exclusive access to restricted files.

To run Command Prompt as an administrator, follow these steps:

  1. In Windows Search, type «Command Prompt.»
  2. Right-click on the Command Prompt app and click Run as administrator.
    Running Command Prompt as an Administrator on Windows

If the error persists after giving the administrator access to Command Prompt, apply the next fix.

2. Ensure the File Isn’t Password Protected

If the file you are trying to access through Command Prompt is password-protected, it may not be accessible. This may result in an error message saying, «the system cannot find the path specified.»

Therefore, you should check the file or folder to which the system cannot find the path. If the file is password-protected, remove the password, and the problem will be resolved. If you’re sure the file isn’t password-protected, skip this fix and go to the next.

3. Check Your System for Viruses

Virus attacks may not be the most common reason you see the «the system cannot find the path specified» error. But it’s best practice to check your system for viruses before you proceed with other fixes. This ensures that your computer is safe and free from threats before you begin tweaking system settings.

If you have a third-party antivirus program installed on your computer, you can run it to check for threats. However, if you don’t have one, you can use the built-in antivirus program on your program, called Windows Defender. Here’s how:

  1. Press and hold Win + I keys to open Settings.
  2. Then, click Security & Update > Windows Security.
  3. Next, press Virus & threat protection.
    virus and threat protection
  4. Lastly, click Quick Scan.
    quick scan

The scan may take a while if you have a lot of files saved on your computer. Once it’s done and no threats are found, go to the following fixes. If it found some threats, quarantine the files and check if it fixed the problem.

4. Verify the File’s Path

If you’ve been getting this error message on the Command Prompt, check whether you’re typing the correct path or not. Most of the time, this is a human error where users are putting in the wrong path or name on the command line. So, go through your command again and ensure that the path is typed correctly.

If you’re getting this error when trying to download files to your system, check if your default download folder has been changed and ensure that the download location you have exists in your system.

5. Delete Special Characters From the Path

Special characters in a path may not be interpreted correctly by the Command Prompt; they may be interpreted as an operator or something else. Therefore, the interpreted path will differ from the one you originally wrote. Due to this, you may see an error stating that the path specified can’t be located since it’s been modified.

Check the path name you’ve specified in the Command Prompt. If the file’s name contains special characters, the best solution is to rename it and remove any special characters it currently contains. If the issue remains unsolved after applying this fix, continue with the next fix.

6. Make Sure the Code Is Correct

Although pretty obvious, running incorrect code can also result in the «the system cannot find the path specified» error. Once again, review the code you’re running and see if there are any errors in the paths you’ve added. If there is an error in the syntax or command lines, correct them, and you won’t see the error again.

7. Delete Any Invalid Paths in the Environment Variable

An environment variable contains data that can affect how running processes will behave in your system. So, if you run a program on your computer from the command line, the PATH environment variables play an integral role by saving the directory path that can be searched.

To understand how it works, imagine a computer with two different directories. If you are trying to run a program currently in a different directory, your system will search the directories recorded in the PATH variable. If the program is available in any directories, your system can run it without problems.

However, if you put in an invalid path variable, the process will be disrupted, causing the «the system cannot find the path specified» error. So, the best way to fix this problem is to delete the invalid paths from the Environment Variable.

Follow the instruction below to remove the paths:

  1. On your computer, open File Explorer.
  2. Then, look for This PC path on the left-side navigation, right-click on it and choose Properties.
    this PC properties
  3. In the new window, click the Advanced system settings link on the right-side section.
    advanced system settings
  4. From the Advanced tab on the System Properties window, click the Environment Variables button.
    environment variables
  5. Under the User variables section, check the Path variable by clicking on it and pressing the Edit button. This will display all the user variables.
    path user variables
  6. Next, check if the paths are correct and functioning. To do this, just copy the path and paste it on the address bar of the File Explorer. This will allow you to see if the File Explorer can find the path. If you can’t find it, the path is incorrect, and you have to Delete or Edit it. Do this on all the paths provided on the path variable. Once done, press OK.
    edit user path variables
  7. Then, under the System variables section, click the Path variable and press the Edit button.
    path system variables
  8. Repeat step six to check if all the paths are working.
    edit system path variables

You can all view all the path variables in the Command Prompt. Just type echo %PATH% and press Enter. However, it won’t tell you if the path is invalid or not.

8. Check for Incomplete Downloads

Ensure that the file or folder you are trying to access has been installed or downloaded correctly. Sometimes, the download process is interrupted while downloading a file or folder, resulting in an incomplete download. Thus, accessing such broken files using File Explorer or Windows Command Prompt can result in an error.

Therefore, go to the location of the file Command Prompt is unable to access and see if it was downloaded correctly. If a file was incorrectly installed or downloaded, reinstall or download it again. This will likely fix the problem. If that doesn’t work, try the next fix.

9. Check Your System’s Registry

If you have edited the AutoRun keys in the Registry Editor, it might be the reason why you’re getting a «the system cannot find the path specified» error. The AutoRun keys function by performing a command automatically when opened. If the information specified in the keys is wrong, errors may occur. Follow the instructions below to solve this issue.

  1. Press and hold Win + R keys to open Run. Then type Regedit and press Enter.
  2. On the Registry Editor, copy and paste the following path on the address bar:
    HKEY_LOCAL_MACHINESoftwareMicrosoftCommand Processor 
    registry editor address bar
  3. Next, check if there is an AutoRun key. If there is, Delete or Modify the data.
    Autorun key
  4. Lastly, check if you’re still having the same issue.

10. Run an SFC Scan

If none of the methods above work, you can run a System File Checker (SFC) scan to look for corrupted files in your system and fix them automatically. Here’s how:

  1. Press and hold Win + R keys to open Run. Then type cmd and press Enter.
    cmd
  2. On the Command Prompt, type sfc /scannow and press Enter.
    sfc scan now
  3. If SFC finds errors but can’t repair them, type this command after exe /Online /Cleanup-image /Scanhealth and press Enter.
  4. Then, type exe /Online /Cleanup-image /Restorehealth and hit Enter.
  5. Restart your computer and see if it fixes the issue.

11. Update Your Operating System

The last thing you need to do to fix this error is to update your Windows system. While you shouldn’t run an outdated system, doing so can cause various issues to your system, including the «the system cannot find the path specified» error. Follow the steps below to upgrade your Windows:

  1. Open the Settings app on your system by pressing and holding Windows + I keys.
  2. From Settings, go to Update & Security > Windows Update.
  3. Then, click the Check for Updates button if there are any updates, download and install them.
    check for updates
  4. Restart your PC and check if you’re still experiencing the same error.

An Error-Free Windows Once More

Most of the time, the «the system cannot find the path specified» error is often caused by an invalid path or corrupted files in your system. After doing the fixes mentioned above, your system should run smoothly without errors. If you’re trying to run a program and getting this error, finding the correct install location of the software may help fix the problem.

Have you gotten error «the system cannot find the path specified» in Command Prompt or some other software? In this post, MiniTool Partition Wizard offers you 8 ways to fix the issue effectively.

The System Cannot Find the Path Specified

You may get «the system cannot find the path specified» error in the following cases:

  • The error pops up once you have opened the Command Prompt.
  • In the Command Prompt, you use cd command to open a directory, or you use commands to run a program, script file, etc.
  • You are installing software, but the installation fails due to this error.
  • You are using software like uTorrent to write data to disk (for example, download, save, etc.).

the system cannot find the path specified

Why does the error «the system cannot find the path specified» occur? The possible reasons are as follows:

  • The path is invalid. For example, you type a wrong path; the directory has been changed, deleted, or lost.
  • There are invalid paths in PATH Environment Variable.
  • Virus attacks.
  • Other issues like outdated operating system, incompatible software, etc.

How to solve this issue? Please refer to the following methods.

Fix 1. Run an Anti-Virus Scan

Although virus attack is not the most common reason for the error «the system cannot find the path specified», I still recommend you to run an anti-virus scan first, providing a safe environment for the following solutions.

If you have third-party antivirus software installed, you can run it. If you have no antivirus software installed, you can run Windows Defender, a Windows in-built antivirus program. Here is the guide:

  • Click Start button and select the Settings icon.
  • Go to Security & Update > Windows Defender.
  • Click Open Windows Defender Security Center in the right panel.
  • Click Virus & threat protection.
  • Click Quick scan.

5 Best Free Antivirus for Windows 11/10 Computer in 2021

Fix 2. Verify Path

Have you typed the right path/name? If the path/name is wrong, the system cannot find the folder or file, and then you will surely get the error «the system cannot find the path specified». So, please verify the path, making sure it’s typed correctly.

If you get this error when downloading some files through uTorrent, please check whether the default download folder is changed. Please make sure the download location really exists.

Fix 3. Recover Folders or Files

One of the reasons why the system cannot find the path specified is that the folder or file gets lost. Please exit Command Prompt and check whether the folder or file is still in PC. If the folder or file is really lost, please get them back.

If other people have a copy of the folder or file, please copy or download it to your PC. If the folder or file is unique to you, you may need to recover it with a data recovery program. MiniTool Partition Wizard has a data recovery feature, supporting recover up to 70 types of files. But this requires Pro Deluxe or higher editions.

Here is the guide on how to recover data using MiniTool Partition Wizard:

Free Download

Step 1: Launch MiniTool Partition Wizard and go to its main interface. Click Data Recovery on the toolbar.

click Data Recovery on the toolbar

Step 2: Choose a logical drive or a specific location (desktop, recycle bin, or a folder) and then click Scan. Choosing a specific location may shorten the scanning time. In addition, if you know the file’s type, you can click the Settings button to limit scanning range by selecting file types.

choose the location to recover data

Step 3: After the scanning process is completed, find the files you want with built-in tools. Then, select files and Save them to a safe place.

  • Path: It lists files according to their paths.
  • Type: It lists files according to their file types.
  • Show Lost Files: It only displays the lost files.
  • Find: It allows you to find out the lost files by typing a continuous part of their file names.
  • Filter: It allows you to find out the lost files through narrowing down the files range according to filename/extension, file size, creation/modification date, etc.
  • Preview: It allows you to preview the files that don’t exceed 100 MB before the data is saved.
  • Export Scan Result: It allows you to export the scan result files. And then you can load this file later through Recovery Result — Load Manually feature to recovery data in that file without a second scan.

find files and save them to a safe place

Fix 4. Remove Invalid Paths from the Environment Variable

Environment variables contain information needed by one or more applications. When we want to run a program from the command line, PATH Environment Variable is very important, which is used to save the directory path that can be searched.

For example, if the program to be run is not in the current directory (you are currently in directory A but want to run a program in directory B), the operating system will search the directories recorded in the PATH variable in turn. If the program to be run is found in these directories, the operating system can run it.

Therefore, invalid path variable may disturb this process, causing «the system cannot find the path specified» error. In this case, you can delete these invalid paths from the Environment Variable. Here is the guide:

Step 1: Open File Explorer, right-click on This PC and choose Properties. In the new window, click Advanced system settings at the upper left section. Under the Advanced tab, click Environment Variables.

open Environment Variables

Step 2: In the Environment Variables window, check the Path variable under both User variables and System variables sections. You just need to click the path variable and choose Edit. This will display all user or system variables.

check whether path is valid

Step 3: Check these paths one by one to see whether they are correct. You just need to copy the path, paste it to the search bar of File Explorer, and see whether the File Explorer can find the path. If not, it means that the path is incorrect. Then, you should delete or correct the path.

verify path in File Explorer

Tip: Command «echo %PATH%» just displays all path variables. It cannot tell you whether a path is invalid.

Fix 5. Check Registry

Have you ever edited AutoRun keys in Registry Editor? This key means that the Command Prompt will perform a command line automatically when it is opened. If the key’s data is wrong, the error «the system cannot find the path specified» may also happen. Please do as follows to solve this issue.

  • Open Registry Editor
  • Navigate to HKEY_CURRENT_USERSoftwareMicrosoftCommand Processor. Check whether there is a key named AutoRun. If there is the AutoRun key, please delete it or correct it.
  • Navigate to HKEY_LOCAL_MACHINESoftwareMicrosoftCommand Processor. If there is the AutoRun key, delete it or correct it.

check the AutoRun key

How to Backup and Restore Registry in Windows 10

Fix 6. Create a Second Windows Account

When you install some software, you may get the error «the system cannot find the path specified», which will block the software installation. The reason may be the problematic User Profile. Then, you can solve the problem by creating a second Windows account. Here is the guide:

  • Select the Start button, then select Settings > Accounts > Your account.
  • Select Family & other users (or Other users, if you’re using Windows 10 Enterprise).
  • Under Other users, select Add someone else to this PC.
  • At the bottom of the page, select I don’t have this person’s sign-in information.
  • At the bottom of the next page, select Add a user without a Microsoft account.
  • Enter a name for the new account. If you want this person to sign in with a password, enter and verify the password, add a password hint, then select Next.
  • Select Finish and close all windows.
  • Go to Start > Settings > Accounts >Your Account and click Sign in with local account Instead. Follow the steps to switch your account to local account.
  • Log off from the existing User Profile and log in with the new account. Then, try to convert the new account as Microsoft account by navigating to Start > Settings >Accounts >Your Account > Sign with Microsoft account Instead. Use Microsoft account credentials to make it Microsoft account. Check if everything works fine.

Fix 7. Repair System Files

If all of the above methods don’t work for you, you can try checking and repairing system files. Here is the guide:

  • Open Command Prompt.
  • Type «sfc /scannow» and press Enter

If the SFC detects errors but it cannot repair them, you can then use the following command lines:

  • exe /Online /Cleanup-image /Scanhealth
  • exe /Online /Cleanup-image /Restorehealth

Some people may also suggest you clean temporary files and folders, you can try it.

Fix 8. Perform System Restore or Update

If you have tried all of the above methods but none of them works, you can try restoring PC to a previous normal state or updating it. The two methods may repair the system.

  • To perform System Restore, please refer to this post: How to Restore Computer to Earlier Date in Win10/8/7 (2 Ways). Please note that this method requires a system restore point that you have created in advance.
  • To update Windows, please refer to this post: Update Windows 11/10 to Download & Install Latest Updates.

Here is a post talking about how to fix error «the system cannot find the path specified». This error may occur in CMD or some other software. Fortunately, this post offers 8 solutions to this problem. If you have the same issue, you can try them.Click to Tweet

Bottom Line

Is this post useful to you? Have you encountered this problem in other cases? Do you have other solutions to this problem? Please leave a comment for sharing. In addition, if you have difficulty in recovering data, please contact us via [email protected]. We will get back to you as soon as possible.

You may have seen the error message, “The system cannot find the path specified,” while copying a file/folder path or installing a program. It mostly occurs when the direct link for a file or folder item is broken or invalid. If not that, your device may be infected with a virus. Try one of the following solutions to fix the error in Windows 10 and Windows 11.

Tip: dealing with a snipping tool error instead? We show you what to do.

Content

  • What Is «The System Cannot Find the Path Specified» Error?
  • 1. Fix the Invalid Folder Path
  • 2. Delete Invalid Environment Path Variables
  • 3. Modify Owner for File/Folder Permissions
  • 4. Ensure File/Folder Path Location Is Accessible
  • 5. Check If the File/Folder Wasn’t Deleted
  • 6. Recreate Shortcuts for the Concerned File/Folder
  • 7. Turn On Controlled Folder Access
  • 8. Check Device Performance and Health
  • 9. Enable Virus & Threat Protection Settings
  • 10. Update Security Intelligence
  • 11. Download & Install All Pending Windows Updates
  • 12. Use Troubleshooting in Advanced Startup Mode
  • Frequently Asked Questions

“The system cannot find the path specified” error means the currently logged-in PC user does not have the proper permission to access a file or folder. It’s encountered in the Command Prompt while navigating to a directory path using cd or trying to open unavailable files from their links using a dir.

System Cannot Find The Path Specified Error Details

The error message also shows on a Windows desktop while attempting to install or start a program.

System Cannot Find The Path Specified Error On Desktop Screen

The path specified errors used to be a common annoyance in Windows 7 and earlier versions. They may still occur in Windows 10 and its predecessors (due to user mistakes) but are increasingly rare in Windows 11 because of its support for advanced malware control. Here’s how to deal with this error if it ever shows up.

1. Fix the Invalid Folder Path

While typing within Command Prompt, users may mistakenly type an invalid folder path. (It’s so much easier to copy-paste them.) To rectify this, cross-check the actual folder path and make changes.

  1. Browse to the designated folder using File Explorer.
  2. Right-click to view the folder’s Properties. In the following example, we are fixing the invalid folder path for desktop.
System Cannot Find The Path Specified Folder Right Click Properties
  1. Go to the “General” tab and copy-paste the folder’s path from “Location.”
System Cannot Find The Path Specified Check Properties Of Folder
  1. Paste the actual folder path in Command Prompt to check whether the path specified error still persists.
System Cannot Find The Path Specified Correct Invalid Folder Path

2. Delete Invalid Environment Path Variables

To help navigate the files and folders, Windows uses a series of shortcut commands called environment variables, the most important of which is the %path% variable. You can manually check its entire list to determine whether there are any invalid entries, which should be deleted immediately.

  1. Open “View advanced system settings” from the Control Panel or Windows search menu.
System Cannot Find The Path Specified View Advanced System Settings
  1. Navigate to the “Advanced” tab and click “Environment Variables” under “Startup and Recovery.”
System Cannot Find The Path Specified System Properties Environment Variables
  1. Select the “Path” entry under “System variables,” and click “Edit.” This will open a new pop-up window.
System Cannot Find The Path Specified System Variables Path Select
  1. Explore each and every path variable and copy the entire path.
System Cannot Find The Path Specified Edit Environment Variables Path Select
  1. Using Windows 11’s File Explorer tabs or the address bar in Windows 10, search for the path variable’s existence.
  2. If a path does not exist, go back to the previous screen to delete its variable. This will prevent the path specified errors.
System Cannot Find The Path Specified Check Environment Variables Path

3. Modify Owner for File/Folder Permissions

Whether you log in as an administrator or otherwise, you may find yourself not having the permissions for the file or folders you want to access. This can be fixed by modifying the owner as shown.

  1. Right-click the inaccessible folder and click “Properties.”
System Cannot Find The Path Specified Right Click Properties
  1. Under the “Security” tab, you can see the entire list of usernames associated with the folder’s permissions.
  2. Click “Advanced” to change the permissions.
System Cannot Find The Path Specified File Properties
  1. Under the “Advanced” options, you can see the folder’s current “Owner.” Click “Change” to modify the Owner.
System Cannot Find The Path Specified File Pwner Permissions Change
  1. If you’ve logged in as the administrator, search for the object name administrator under “Check names.”
System Cannot Find The Path Specified Select User Or Group
  1. The correct user or group name should be highlighted with an underscore beneath the object. Click “OK” to confirm.
System Cannot Find The Path Specified File Pwner Permissions Administrator
  1. When the folder’s current owner has been changed to the logged-in user (or administrator), you should not see the error again.
System Cannot Find The Path Specified Modified System Owner

Good to know: File Explorer not functioning the way it’s supposed to? Try these fixes for common problems.

4. Ensure File/Folder Path Location Is Accessible

A file or folder path location may be inaccessible for many reasons. Find out by going to the designated folder and right-clicking the file to view its Properties. If the folder can be opened directly from its folder path (which can be viewed in “Location” under the “General” tab), it means there are no problems enabling folder access.

There are many other techniques to view inaccessible folders, as covered in this example for opening the WindowsApps folder in Windows.

System Cannot Find The Path Specified Path File Location

5. Check If the File/Folder Wasn’t Deleted

Sometimes you may just find one of the files or folders missing because they got deleted without your knowledge. As a result, the system cannot find the specified path in Command Prompt and other modes. To check the current status of deleted files and folders, use the search icon in its File Explorer window, which will display a list of currently available items. Also, check the Recycle Bin to see if those deleted files are still there.

System Cannot Find The Path Specified File Is Deleted

6. Recreate Shortcuts for the Concerned File/Folder

The path specified error may occur spontaneously if there were corruptions in shortcuts for a folder. In such cases, you need to delete those shortcuts and recreate them again in the File Explorer window.

  1. It is very easy to create a new shortcut for the given folders: right-click and go to “Show more options” as displayed here.
System Cannot Find The Path Specified Show More Options
  1. Click “Send to” and select “Desktop” in the list of shortcuts for the file or folder.
System Cannot Find The Path Specified Recreate Shortcut Windows11

7. Turn On Controlled Folder Access

There are some third-party apps that can make changes to your folder’s permissions without your knowledge, including making their paths inaccessible. To prevent this, Windows offers a security feature called Controlled Folder Access, which can undo any changes that are harmful to your device.

  1. Using the Run command Win + R, type windowsdefender: to launch a Windows Security window.
  2. Look under “Virus & threat protection -> Ransomware protection” for a menu option called “Controlled folder access.” If it’s turned off, turn it back on.
System Cannot Find The Path Specified Windows Security Controlled Folder Access On
  1. Click on the “Protected folders” linkk which will take you to a new page where you can “Add a protected folder.”
  2. Browse your computer’s folders to add it to the “Protected folders” list. You can add an entire drive, such as C: drive, as shown below. This will cover everything under your PC’s settings.
System Cannot Find The Path Specified Windows Security Add A Protected Folder

8. Check Device Performance and Health

If your Windows device is not healthy, you may have trouble with malware that can bring undesirable changes to your system. To undo the damage, it is helpful to check device performance and health and take corrective actions where required.

  1. Open “Windows Security” followed by the home page. It will give you the entire “Security at a glance.”
  2. Make sure there is a green checkmark next to each of the device security options. If not, take the recommended action.
  3. Open the “Device performance and health” menu item.
System Cannot Find The Path Specified Windows Security Device Performance And Health
  1. Check the health report for each of the options: storage capacity, battery life, apps and software, and Windows time service.
  2. If any of these display issues, they need to be fixed at the user end. For example, if certain apps are conflicting with your system’s security, they should be uninstalled immediately.
System Cannot Find The Path Specified Health Reports Device Performance And Health

Tip: if you’re not a fan of Windows’s built-in security suite, you can permanently disable the Windows Defender.

9. Enable Virus & Threat Protection Settings

If a piece of malware was snuck into your computer, you can remove it easily using Windows Defender’s Virus & Threat Protection settings.

  1. The “Virus & Threat Protection” settings option can be opened from a Windows search in System settings or the Windows Security window as covered in earlier steps.
System Cannot Find The Path Specified Virus And Threat Protection Search
  1. Turn on all the protection settings, including “Real-time protection,” “Cloud-delivered protection,” “Tamper protection,” and “Automatic sample submission.”
System Cannot Find The Path Specified Enable All Virus And Threat Protections
  1. Perform a quick scan in Windows Defender for viruses and other threats to help identify and quarantine the malware on your device.
System Cannot Find The Path Specified Virus And Threat Protection Quick Scan

10. Update Security Intelligence

Chances are a new malware variant may have arrived, causing problems with file and folder access. This can be rectified by using Windows Defender’s Security Intelligence feature, which fights zero-hour threats.

  1. Open Windows Security and navigate to “Virus & threat protection.”
  2. Go to “Protection updates” and check whether the “Security Intelligence” on your device requires an update.
  3. If the updates haven’t arrived, your device is vulnerable to virus and spyware changes. Click “Check for updates” to rectify the issue.
System Cannot Find The Path Specified Protection Definition Updates
  1. It takes a few minutes for the Security Intelligence to update itself. After that, a green checkmark is displayed, which will take care of new threats.
System Cannot Find The Path Specified Protection Updates Up To Date

11. Download & Install All Pending Windows Updates

If you haven’t updated a Windows device, it can introduce errors in system folders, rendering them inaccessible. Therefore, finishing a pending update is the best way to address this.

  1. Go to “Settings -> Windows Update” and click “Check for updates.”
  2. Download all necessary and cumulative updates for your Windows device as shown.
System Cannot Find The Path Specified Check For Windows Updates

12. Use Troubleshooting in Advanced Startup Mode

If all else fails, you can fix the specified path access errors using troubleshooting steps in Advanced Startup mode.

  1. It can be viewed from “Settings -> System -> Recovery -> Recovery options -> Advanced startup.”
  2. Click the “Restart now” button to proceed with an advanced troubleshooting step.
System Cannot Find The Path Specified Advanced Startup
  1. A blue troubleshooting screen will flash after a restart. There are many good solutions in this window. You can uninstall any recent updates that may be causing the system errors. Another option is to open Command Prompt and type sfc/scannow or DISM.exe, which are proven ways to repair corrupt registry files.
System Cannot Find The Path Specified Advanced Startup Uninstall Updates

Tip: you can give Windows 11 a go, without fully removing Windows 10 from your system.

Frequently Asked Questions

What does it mean when the system cannot find the path specified, but it exists?

If you see a system cannot find the path specified error, but it exists (check solutions 4 and 5), it means something on your PC is preventing you from accessing a network location or drive with the file or folder.

How do I fix broken file paths?

One way to fix broken file paths in Windows is to delete special characters in file names, as they can interfere with the path variables in Windows. You can also check for any shortcut files related to your broken file paths and delete them. These shortcuts can be recreated later.

How to fix the system cannot find the path specified in Task Scheduler?

Image source: Pexels. All screenshots by Sayak Boral.

Sayak Boral

Sayak Boral

Sayak Boral is a technology writer with over eleven years of experience working in different industries including semiconductors, IoT, enterprise IT, telecommunications OSS/BSS, and network security. He has been writing for MakeTechEasier on a wide range of technical topics including Windows, Android, Internet, Hardware Guides, Browsers, Software Tools, and Product Reviews.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Понравилась статья? Поделить с друзьями:
  • Ошибка the system cannot boot
  • Ошибка there not enough free space
  • Ошибка the statement has been terminated
  • Ошибка there is not enough memory available
  • Ошибка there is no more