Zoyinc
  • Home
  • Contact
  • Categories
    • CD Archiving
    • GIMP
    • Linux
    • MythTV
    • Open Media Vault
    • Technology
    • VMware
    • WordPress
    • YouTube
  • About


Deleting and moving deep paths in Windows

By

Tony

,

August 29, 2013

The Problem

Long PathsWindows and even Windows 7, have a problem with paths that are over 260 characters. Basically DOS or command line and Windows Explorer can’t deal with paths this long.

The thing is the problem is not about Windows API, the basic components of Windows, but about the programs that run in Windows. An example of this is that Java doesn’t seem to have the 260 character problem, even on Windows.

So for example Java may create a very deep path and then you try to delete the path or sub-directories and Windows Explorer won’t let you instead giving you some obscure error message.

What can you do

The easiest common thing to do is to move/drag sub-directories up higher and then you can delete them, but this is such a pain.

Then I read somewhere, sorry I don’t know where otherwise I would credit them, who suggested robocopy.exe. This program is free from Microsoft and is a tool to clone a directory – very handy but a slightly long story. The bottom line is that Robocopy doesn’t have a problem with paths over 260 characters.

So how to delete with Robocopy

The simple thing is to mirror an empty directory to the one you want to delete. So imagine you want to delete:

C:\Temp\my really really deep directory

First find or create an empty folder, say:

C:\Temp\EmptyFolder

Then get a copy of robocopy.exe from Microsoft and put it in “C:\Windows\system32” – it may already be there. To check open up a command prompt and run “robocopy”.

To delete your directory run the following:

robocopy "C:\Temp\EmptyFolder" "C:\Temp\my really really deep directory" /MIR

This won’t delete “my really really deep directory” but it should be empty now so you can just delete it in Windows Explorer.

Related

Network browsing broken with Windows 10 build 1809
Jensen Harris’s keynote at uxweek on Windows 8
Can’t delete a recording
OpenLDAP for Windows
Recent

  • AlmaLinux GUI – no taskbar or application shortcuts

    AlmaLinux GUI – no taskbar or application shortcuts

  • AlmaLinux 9.5 base VM

    AlmaLinux 9.5 base VM

  • Reset Kodi thumbnails

    Reset Kodi thumbnails

  • Set default settings values in Kodi skins

    Set default settings values in Kodi skins

  • Add/Remove/Reset music/video libraries in Kodi

    Add/Remove/Reset music/video libraries in Kodi

  • Zoyinc Kodi skin on Sony TV

    Zoyinc Kodi skin on Sony TV

  • [L] – WordPress UAM Locked Post

    [L] – WordPress UAM Locked Post

  • Import Pictures and Videos – images not previewed

    Import Pictures and Videos – images not previewed

  • Find My Train

    Find My Train

  • WordPress style name not visible

    WordPress style name not visible

About Zoyinc

  • Contact Us
  • Zoyinc Disclaimer
  • Google Search Console
  • Privacy Policy
  • Site Statistics
  • Login

Apache Auckland Backup CD CentOS Centos7 Children Configuration Debian Error ESX ESXi Fedora Firewall Install Josh Kids Kodi Linux MariaDB MySQL MythTV New Zealand OKD OMV Open Media Vault OpenShift PHP Player Python RAID RedHat Red Hat Rip School Setup SMB SonicWALL Spark tags Train Trains VLAN VM VMware Weaver Windows WordPress YouTube

Powered by

This site is licensed under a Creative Commons Attribution 4.0 International License.