Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
Profil ag30rox
Femeie
25 ani
Arges
cauta Barbat
32 - 46 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [WINDOWS] Rename Files with Too Long Paths or Enable Long Paths Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 6 ani
Postari: 787
Sometimes you encounter very long paths for some files and you realize that you can't open or rename or delete them anymore.

One simple way to rename them would be via CMD.

1. Open Command window (either search it in Start Menu, or go to Start - Run - cmd).

2. Type: ren "ENTIRE PATH OF THE FILE.extension" NEWNAME.extension

3. Press enter.

4. You can also rename a folder by opening CMD in the folder that contains the one you want renamed, and type this command: ren "D:\New\Looong loooong folder name" Short

eg.
D:\This is a loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong path\This is a very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong path\This file has a very very very very very loooooooooooooooooooooooooooooooooooooooooong name.txt

The path above has a length of more than 255 characters and thus the file cannot be opened, renamed or deleted.

In CMD type:

rename "D:\This is a loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong path\This is a very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong path\This file has a very very very very very loooooooooooooooooooooooooooooooooooooooooong name.txt" Short.txt

Normally there is no need for Administrator privileges (assuming you have rights to edit in that folder).


pus acum 5 ani
   
Mrrrr
AdMiN

Inregistrat: acum 17 ani
Postari: 2228
First things first, an alternative to the above would be to open the path in WinRAR and rename the files and folders from there in order to delete the file for example.
This one I tested, but there might be other programs that bypass the Windows limitation.



I'm not gonna start a new topic for this.

There are ways to enable long paths in Windows.

Both the methods below might require you to be an administrator or you could ask someone with administrator privileges that can access the following.

Using Group Policy Editor

1. Open Start - Run and type gpedit.msc then press Enter (or simply search for Edit Group Policy in the Start Menu)

2. Navigate to Computer Configuration - Administrative Templates - System - Filesystem

3. On the right side find Enable Win32 long paths and double click it

4. Switch it to Enabled and click OK to confirm

Using Powershell

1. Open Start and search for Windows Powershell, right click it and select Run as Administrator

2. At the cursor, enter the following command and press Enter:

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force


3. You should receive a confirmation message like this:

LongPathsEnabled : 1
PSPath           : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
PSParentPath     : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
PSChildName      : FileSystem
PSDrive          : HKLM
PSProvider       : Microsoft.PowerShell.Core\Registry


Source:


_______________________________________


pus acum 4 luni
   
Pagini: 1  

Mergi la