What's new

Welcome to GloTorrents Community

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Ask question

Ask Questions and Get Answers from Our Community

Answer

Answer Questions and Become an Expert on Your Topic

Contact Staff

Our Experts are Ready to Answer your Questions

How to delete files where Windows tells me that the Path length/filename is too long

BJtheDJ

𝒯𝔬𝔯𝔯𝔒𝔫𝔱 ℒ𝔒𝔀𝔒𝔫𝒹/π”π”žπ”°π”±π”’π”― 𝔇𝔍
+Lifetime VIP+
Verified Uploader
Contributor
Registered
Joined
Dec 11, 2019
Messages
359
Reaction score
179
Points
43
Credits
2,307
Have some directories that I wanted to transfer to another HD, but had a large number of
files left over when the move/copy failed due to the path length/filename being too long.

Here are a couple of examples:

J:\mp3 dvd\_Mutz 2018\MutzNutz Music Pack 107 2018\The Clash - Discography\Studio Albums\1979 - London Calling (25th Anniversary Legacy Edition)\London Calling - 25th Anniversary Legacy Edition, The Vanilla Tapes (Disc 2)\06 - Koka Kola, Advertising & Cocaine.mp3

J:\mp3 dvd\_Mutz 2018\MutzNutz Music Pack 156 2018\Partybreaks and Remixes - All In One October 001 (2018)\10. Jonny Laz _ Justin Timberlake Vs. David Guetta - Can't Stop The Feeling (Jonny Laz Vs. Dexterous Fmif Edit) (Jonny Laz Vs. Dexterous Fmif Edit)[Clean].mp3

I managed to copy the files by copying them to archives using WinRAR and then moving
the RAR files to the target directory and extracting the files, but that still left me with
the original files/directories.

I deleted almost all of those by adding them to an archive uisn WinRAR and using the
'delete file after archiving' option, but that left me with just the one directory-path to get
rid of - and that's the first one, The Clashes 'Vanilla Tapes'.

Ideas welcome, 'cos I am completely stumped here.

Oh! Running Windows 8.1 here
 
Last edited:

MarkM

Member
Registered
Joined
Nov 24, 2019
Messages
5
Reaction score
5
Points
3
Credits
35
I have this frequently with the MutzNutz files, the holding file rename that to a, if there is any sub folders then rename them to b c x y anything as long as it isn't a repeat and then you can move the long file if you still can't move the long file rename that file BUT you can only rename a long file 'if' you have already renamed the holding folder.
same thing if you choose to just delete the file as you get an error saying too long file name cannot be deleted etc etc
 

Prom3th3uS

Administrator
Staff member
Junior Administrator
Super Moderator
+Lifetime VIP+
Contributor
Registered
Joined
Oct 21, 2018
Messages
622
Reaction score
255
Points
63
Location
Unknown
Credits
10,139
Use PowerShell to move/copy/delete files. Without allowing OS to accept long paths.
Make your OS to Accept Long File Paths. No need to use PowerShell if you allowed long paths.

Everything explained here, Kindly, Read it and follow instructions

Optional: What I simply do when I face any issue like that, I use Path Length Checker, it's a PowerShell script for OS'es, you can use this tiny tool to locate the long filenames/charters and rename them easily.

Cheers, I hope this helps, and you will get rid of it. :)
 

BJtheDJ

𝒯𝔬𝔯𝔯𝔒𝔫𝔱 ℒ𝔒𝔀𝔒𝔫𝒹/π”π”žπ”°π”±π”’π”― 𝔇𝔍
+Lifetime VIP+
Verified Uploader
Contributor
Registered
Joined
Dec 11, 2019
Messages
359
Reaction score
179
Points
43
Credits
2,307
I have this frequently with the MutzNutz files, the holding file rename that to a, if there is any sub folders then rename them to b c x y anything as long as it isn't a repeat and then you can move the long file if you still can't move the long file rename that file BUT you can only rename a long file 'if' you have already renamed the holding folder.
same thing if you choose to just delete the file as you get an error saying too long file name cannot be deleted etc etc
Windows will not allow me to do anything at all to the file. Roght-clicking does not
show the usual menus that include rename, delete etc

With everything that I have done, I can no longer acces the final directory in the Path,
being told "Path...." is not accessible, and below that - access is denied.

Right-clicking the "1979 - London Calling (25th Anniversary Legacy Edition)" directory
gives me the normal options, but if I try any of them I'm told that I require permission.

Right-clicking and selecting Properties tells me that the folder is empty and is Read-Only,
attempting to change that atrrib fails.
 

BJtheDJ

𝒯𝔬𝔯𝔯𝔒𝔫𝔱 ℒ𝔒𝔀𝔒𝔫𝒹/π”π”žπ”°π”±π”’π”― 𝔇𝔍
+Lifetime VIP+
Verified Uploader
Contributor
Registered
Joined
Dec 11, 2019
Messages
359
Reaction score
179
Points
43
Credits
2,307
Use PowerShell to move/copy/delete files. Without allowing OS to accept long paths.
Make your OS to Accept Long File Paths. No need to use PowerShell if you allowed long paths.

Everything explained here, Kindly, Read it and follow instructions

Optional: What I simply do when I face any issue like that, I use Path Length Checker, it's a PowerShell script for OS'es, you can use this tiny tool to locate the long filenames/charters and rename them easily.

Cheers, I hope this helps, and you will get rid of it. :)
I have no great experience of PowerShell. I did look at it late last year and searched online in vain for a list of commands, but eveyrthing that I found assumed that I alrady knew everything that there was to know about PowerShell.

The guide that you pointed me to will take a fair amount of reading so that will have to come a little later, butgave me some small cuse so I tried remove-item with the -force and -recurse switches. Tried it with the switches in either order JIC but got the same results:

Clip0004.jpg
 

Hippy

Moderator
Staff member
Super Moderator
Contributor
Registered
Joined
Sep 30, 2020
Messages
130
Reaction score
55
Points
28
Credits
907
I cant say i have had any issues with deleting files as you show, but maybe, just maybe it might be because i use total commander for my file manipulation, and any that say i dont have permission i use a reg file called "take ownership" which gives you the option of owning any file and allowing you to alter it if it was saved by a different user. I might be taking out of my butt , and probably gets told i dont know what im talking about, but hey, i might not know, (but it works for me. once you enter the file into your reg, right click on any file and you will see "take Ownership" as an option and selecting it gives you full permission for that file. I have no idea who wrote it or even if it is available to download, or if im breaking any site rules, (sorry if i am).
 

Attachments

  • TakeOwnership.zip
    622 bytes · Views: 1
shape1
shape2
shape3
shape4
shape7
shape8
Top