Restore full folder and file names for project archives on Windows
Background
When using the Project Archive tool to extract project archives, you may encounter issues with long file paths and nested subfolder structures that can exceed the standard Windows path limit of 260 characters. To prevent broken archive files and extraction errors, the Project Archive tool automatically truncates folder and file names during extraction.
To help you restore the full folder and file names after extraction, Procore includes a CSV path mapping file (path-map.csv) within the extracted archive folder. This file lists each truncated name alongside its corresponding full name. You can use the CSV file along with a standard PowerShell script to quickly restore all complete item names.
Things to Consider
-
Additional Information:
-
Do not run the PowerShell script on an unextracted
zip filearchive file. -
Close any open files or documents located inside the extracted archive folder before running the PowerShell script to prevent file-locking errors.
-
Running the PowerShell script multiple times is safe if certain folder or file names were already partially restored.
-
Prerequisites
Open the extracted archive folder
-
Unzip your downloaded
.ziparchive file. -
Open the unzipped archive folder in File Explorer.
-
Verify that the
path-map.csvfile is present in the archive folder.
Note: This CSV file contains three columns:Type,ShortenedNameandOriginalName.
Open PowerShell in the extracted archive folder
Important
You must open PowerShell inside the extracted archive folder path. If it is opened from another location, the PowerShell script will not locatepath-map.csv or your files.Choose one of the following methods:
Option A: Address bar (recommended)
-
In your Windows system, open File Explorer.
-
In File Explorer, navigate into the extracted archive folder so that the
path-map.csvfile is visible. -
Click an empty area on the 'address bar' at the top of the window (where the file path is listed).
-
Type
powershelland press Enter.
The Windows PowerShell window opens, targeting your extracted archive folder path.
Option B: Context menu
-
In your Windows system, open File Explorer.
-
Open the extracted folder in File Explorer.
-
Press and hold the Shift key, then right-click on an empty area inside the folder window.
-
Select Open PowerShell window here (on Windows 11, select Open in Terminal).
Verify your directory
In the PowerShell window, type dir and press Enter.
-
If
path-map.csvis listed in the output, you are in the correct Directory. -
If
path-map.csvis not listed, navigate to the folder by entering the following command (replacing the path with your actual Directory path):-
cd "C:\full\path\to\your-extracted-folder"
-
Run the PowerShell script
-
Copy the script block below:
-
# Run from inside the extracted folder (the one containing path-map.csv)
$map = Import-Csv ".\path-map.csv"
# Rename folders first (deepest matches first so parent renames don't break child paths)
$map | Where-Object { $_.Type -eq 'Folder' } | ForEach-Object {
$short = $_.ShortenedName; $orig = $_.OriginalName
Get-ChildItem -Directory -Recurse |
Where-Object { $_.Name -eq $short } |
Sort-Object { $_.FullName.Length } -Descending |
ForEach-Object { Rename-Item -LiteralPath $_.FullName -NewName $orig }
}
# Then rename files
$map | Where-Object { $_.Type -eq 'File' } | ForEach-Object {
$short = $_.ShortenedName; $orig = $_.OriginalName
Get-ChildItem -File -Recurse |
Where-Object { $_.Name -eq $short } |
ForEach-Object { Rename-Item -LiteralPath $_.FullName -NewName $orig }
}
-
-
Paste the code into your active PowerShell window and press Enter.
-
Once execution finishes, all folders and files within the extracted archive folder will display their full names.

