Windows 10: Can't create or delete files and folder in CMD or PowerShell

Discus and support Can't create or delete files and folder in CMD or PowerShell in Windows 10 Software and Apps to solve the problem; I am running Windows 11 Pro 64-bit 24H2 with the latest updates.For the past few weeks, I have been unable to create or delete files and directories in... Discussion in 'Windows 10 Software and Apps' started by FrankysStein, Feb 27, 2025 at 8:32 AM.

  1. Can't create or delete files and folder in CMD or PowerShell


    I am running Windows 11 Pro 64-bit 24H2 with the latest updates.For the past few weeks, I have been unable to create or delete files and directories in `CMD` or `PowerShell`.Example:C:\Users\MyUser>echo "some text" > new-file.txt The system cannot find the file specified. C:\Users\MyUser>mkdir new-folder The system cannot find the file specified. Deleting files and folders also fails silently—there is no output, but the file/folder remains visible in File Explorer:C:\Users\MyUser>del existing-file.txt C:\Users\MyUser>del existing-folder However, creat

    :)
     
    FrankysStein, Feb 27, 2025 at 8:32 AM
    #1

  2. Trouble deleting a folder

    Thanks for the suggestion but it says "delete folder failed for E:\....." for each folder I try.

    *Confused Can't create or delete files and folder in CMD or PowerShell :confused:

    Will I be forever stuck with these unnecessary folders? *Oh Well Can't create or delete files and folder in CMD or PowerShell :eek:hwell:
     
  3. 0 byte folder cannot be deleted Problem

    I have a 0 byte folder and I can't delete it. I'm using win 7 64 bit.
    please help *Cry :cry:

    It says access denied when trying, please login as admin blah blah msgs....

    I've searched the net for hours, Trying unlocker, fileassassin, and all other 'file deleter' programs out there. tried on safe mode, tried the cmd commands, even in cmd it says access denied, tried the closing explorer.exe and doing the command. I tried changing permissions and atrributes and it says you do not have permission to view or edit this objects permission settings. I logged in as the Administrator and still no hope.

    the folder originally contained all my movies but since then i moved(using the move command) all of them someplace else(on another hdd) and I thought it was gone but the folder is still there, 0 bytes. It was shared when i deleted it and still appeared on the shared folders list but inaccessible coz it was already deleted so i 'unshared' the folder from the shared folders list. and so the problem began. the folder is still there and it is undeletable

    One surefire way to do it without deleting my files is copying all other files to another HDD and reformat it and copy it back again but my hdd is currently contains 1 tb out of 1.36 and i dont have any hdds with that free space to use.

    ALSO I CAN'T OPEN THE FOLDER it says

    Location is not available

    'directory' is not accessible.
    Access is Denied.

    i think its more of a windows glitch than a virus problem

    help??? *Frown Can't create or delete files and folder in CMD or PowerShell :(
     
    lyndonguitar, Feb 27, 2025 at 8:51 AM
    #3
  4. topgundcp Win User

    Can't create or delete files and folder in CMD or PowerShell

    Unable to delete a folder - Invalid folder name


    Suggestion:
    1. Run chkdsk x: /r to make sure that there's no HD corruption.
      x: is the drive containing the folder you want to delete.
    2. Try to delete the folder again. If still does not work, go to step 3.
    3. Download: Download - Linux Mint and create a bootable USB using: Rufus - Create bootable USB
    4. Boot up with Linux Mint and try to delete the folder again.
      NOTE: Unlike WinPE. Linux does not have any Windows permission imposed to it so it is easier to delete.
     
Thema:

Can't create or delete files and folder in CMD or PowerShell

Loading...
  1. Can't create or delete files and folder in CMD or PowerShell - Similar Threads - Can't create delete

  2. Can't create or delete files and folder in CMD or PowerShell

    in Windows 10 Gaming
    Can't create or delete files and folder in CMD or PowerShell: I am running Windows 11 Pro 64-bit 24H2 with the latest updates.For the past few weeks, I have been unable to create or delete files and directories in `CMD` or `PowerShell`.Example:C:\Users\MyUser>echo "some text" > new-file.txt The system cannot find the file specified....
  3. Can't start cmd & powershell as admin

    in Windows 10 Gaming
    Can't start cmd & powershell as admin: I can no longer start the cmd and powershell as administrator, even by right-clicking to start it as administrator. I tried to do a disk scan and nothing changed, I tried to contact the assistance and I also did the repair-update and also this time nothing changed. Thank you...
  4. Can't start cmd & powershell as admin

    in Windows 10 Software and Apps
    Can't start cmd & powershell as admin: I can no longer start the cmd and powershell as administrator, even by right-clicking to start it as administrator. I tried to do a disk scan and nothing changed, I tried to contact the assistance and I also did the repair-update and also this time nothing changed. Thank you...
  5. Easily open PowerShell or CMD in any folder with this registry file

    in Windows 10 Ask Insider
    Easily open PowerShell or CMD in any folder with this registry file: Hi everyone, If you frequently work with the command line in Windows, you might find it useful to open a PowerShell or CMD prompt in a specific folder without navigating to it manually. Fortunately, you can add two new options to the right-click menu of any folder to do just...
  6. How to delete .lnk files using CMD or Powershell?

    in Windows 10 Gaming
    How to delete .lnk files using CMD or Powershell?: I want to delete two shortcuts in my desktop using powershell or cmd but each of them doesn't recognize them. when I enter `dir` in both cmd and pwsh, they jusy not show the shortcuts. it seems like they are ghosts. how can I make to fix this?...
  7. How to delete .lnk files using CMD or Powershell?

    in Windows 10 Software and Apps
    How to delete .lnk files using CMD or Powershell?: I want to delete two shortcuts in my desktop using powershell or cmd but each of them doesn't recognize them. when I enter `dir` in both cmd and pwsh, they jusy not show the shortcuts. it seems like they are ghosts. how can I make to fix this?...
  8. How to delete user account with its folder via CMD or Powershell

    in Windows 10 Network and Sharing
    How to delete user account with its folder via CMD or Powershell: I have windows 10 machines with several users on it. I want to delete these user via CMD or Powershell with all their folders desktop, download, ........etc The below command : net user Test /delete only delete the user which is not enough....
  9. CMD and PowerShell

    in Windows 10 BSOD Crashes and Debugging
    CMD and PowerShell: Hi all, I run Windows 10, v 1803. Clicking Start, typing CMD, there is only "Command Prompt (desktop application)". Win key + X shows "Windows PowerShell" and "Windows PowerShell (Admin)". If after Win key+R I choose Windows PowerShell" pops up a message: Same with...
  10. Can't delete folder that I created

    in Windows 10 Support
    Can't delete folder that I created: This folder was created in Feb. It's in C: Users/(Me)/Music. I named it Overflow so I could move files into it to keep the main folder looking cleaner. It has no content except for a subfolder called "Photos" (which also has no content). When I look at properties I get...