Skip to content

How to Rename a File

Renaming a file changes its name without altering its contents or location. For Unturned™ mod developers, renaming is one of the most frequent file operations. You rename placeholder assets to their final names. You rename copies to distinguish them from originals. You rename misnamed files when a project's naming convention changes. You rename downloaded files to match the structure of an active project. A modder who can rename files quickly and correctly avoids hours of confusion across a long project.

This article covers the four methods Windows provides for renaming files, the rules Windows enforces on valid filenames, the specific danger of renaming file extensions, and the bulk rename techniques that save time on large asset sets. 57 Studios™ naming conventions depend on careful rename discipline.

Prerequisites

You must have File Explorer open with file extensions visible. If you have not enabled file extensions, read How to View File Extensions first. Without extensions visible, you cannot see what part of a filename you are about to rename, and you will make mistakes.

What you will learn

  • The four rename methods and when to use each
  • Which characters are forbidden in Windows filenames
  • The path length limit and why it matters
  • The danger of renaming file extensions and how to do it safely
  • How to bulk rename multiple files at once
  • How to recover from a renamed file that no longer opens correctly
  • How professional modders structure naming conventions for long projects
  • How to use PowerShell for sophisticated bulk rename patterns
  • How rename interacts with file locks, permissions, and open applications
  • How to verify a rename completed correctly

What renaming actually does

Renaming a file changes the directory entry that names the file. The file's bytes do not move, its location does not change, and its file-system attributes (other than the name) remain identical. From an application's perspective, the file at the new name is the same file that previously existed at the old name.

The metadata-only nature of rename means it is fast regardless of file size. Renaming a 100 GB Unity bundle takes the same time as renaming a 1 KB text file. The operation is also atomic at the file system level: either the new name is in place or the old name is, never both and never neither.

The atomicity has implications for applications that watch the file system. An application watching the source name will see the file disappear at the moment of rename. An application watching the destination name will see the file appear at the same moment. There is no intermediate state in which both names exist or neither exists.

Did you know?

The Windows file system stores filenames in directory entries, which are part of each folder's metadata. Renaming a file updates the entry in the file's parent folder. The file's content bytes elsewhere on disk are not touched. This is why rename completes in milliseconds regardless of file size.

Method 1: F2 keyboard shortcut

The F2 key is the fastest rename method and the one professional modders use almost exclusively.

  1. Click the file once to select it.
  2. Press the F2 key.
  3. The filename becomes editable. The base name portion is selected, and the extension is not.
  4. Type the new name, or use arrow keys and Backspace to edit the existing name.
  5. Press Enter to confirm, or Escape to cancel.

The selection of only the base name is a deliberate Windows behavior. It means you can type immediately to replace the base name without accidentally overwriting the extension. To edit the extension, click into the editable area or press End to move the cursor past the dot.

The selection-of-base-name behaviour requires that file extensions are visible. If extensions are hidden (the Windows default for known file types), F2 selects the entire visible filename including what File Explorer is hiding from you. Typing then replaces the visible name, but Windows still appends the hidden extension to whatever you typed. The result is a file with a doubled extension such as MyFile.txt.txt if you typed MyFile.txt while extensions were hidden. This is one of several reasons to keep extensions visible at all times.

Pro tip

After pressing F2, press End to move the cursor to the very end of the filename. From there you can delete characters with Backspace or add a suffix before the extension. This is faster than clicking with the mouse to position the cursor.

Pro tip

Use Tab and Shift + Tab while in rename mode to move to the next or previous file's rename. The next file enters rename mode automatically. This is faster than pressing Enter and then F2 for each successive file when renaming a batch of files individually.

Method 2: Right-click → Rename

The right-click context menu provides the same rename behavior through a visible menu.

  1. Right-click the file.
  2. Choose Rename from the context menu. On Windows 11, the Rename command appears as an icon at the top of the menu.
  3. The filename becomes editable, with the base name selected.
  4. Type the new name.
  5. Press Enter to confirm.

This method is slower than F2 but discoverable for users who have not learned the keyboard shortcut.

On Windows 11 the Rename command is the third icon in the icon row at the top of the right-click menu, between Copy and Share. Hover over each icon to confirm its function via the tooltip. The full text menu beneath the icons still includes the same Rename command for users who prefer reading menu items.

Method 3: Slow double-click

A slow double-click on the filename text itself enters rename mode. The clicks must be slow enough that Windows does not interpret them as a double-click to open.

  1. Click the file once to select it.
  2. Wait approximately one second.
  3. Click the filename text once more.
  4. The filename becomes editable.
  5. Type the new name.
  6. Press Enter to confirm.

This method is finicky because the timing is sensitive. Too fast and Windows opens the file. Too slow and Windows does nothing. F2 is more reliable.

Common mistake

Many users accidentally trigger slow-double-click rename when they meant to select a file. If you click a file, wait, and click again to clarify a selection, Windows enters rename mode and you may type characters that overwrite the filename. Press Escape immediately to cancel.

Common mistake

Slow double-click only works when you click on the filename text, not the icon or the surrounding empty area. Clicking the icon enters drag mode rather than rename mode. Pay attention to the cursor position during the second click.

Method 4: Ribbon or command bar Rename button

The ribbon and command bar expose Rename as a toolbar button.

Windows 10:

  1. Select the file.
  2. Click the Home tab in the ribbon.
  3. Click Rename in the Organize group.

Windows 11:

  1. Select the file.
  2. Click the Rename icon (looks like a small page with a pencil) in the command bar.

Both invocations enter the same edit mode as F2.

Method usage among professional modders

F2 dominates the rename workflow more thoroughly than any other shortcut dominates its operation. The 72 percent share reflects the speed advantage: F2 enters rename mode in a single keystroke with no menu navigation, and the base-name pre-selection means a typical rename is one keystroke plus the new name.

The 14 percent share for right-click is concentrated among modders who use the mouse for most operations and find F2 less ergonomic. The smaller shares for slow double-click and PowerShell reflect their narrower use cases — slow double-click is mostly a discovery accident, PowerShell is reserved for bulk operations.

Comparison of rename methods

MethodSpeedSkill levelBest context
F2FastestBeginnerAny time
Right-click → RenameMediumBeginnerMouse already in hand
Slow double-clickSlowBeginnerDiscovered accidentally
Ribbon Rename buttonSlowBeginnerLearning the interface

Rules for valid filenames

Windows enforces several rules on filenames. Violating any of these rules produces an error and the rename is rejected.

RuleForbiddenWhy
Reserved characters< > : " / \ | ? *Used by Windows for paths and wildcards
Reserved namesCON, PRN, AUX, NUL, COM1-COM9, LPT1-LPT9Legacy MS-DOS device names
Leading or trailing space filename or filename Causes path parsing problems
Trailing periodfilename.Confused with extension delimiter
Empty name(nothing)A file must have a name
Path total lengthOver 260 characters in most contextsLegacy MAX_PATH limit

If you try to use a forbidden character, Windows shows an error and reverts to the original name. If you try a reserved name, the error mentions the name explicitly.

Critical warning

Some characters that look acceptable are actually problematic. The colon : can appear to work in some contexts but separates filename from NTFS alternate data streams. The forward slash / looks similar to backslash but is rejected. Always stick to letters, numbers, hyphens, underscores, periods, and spaces for filenames.

Critical warning

The reserved-name rule applies even when an extension is added. CON.txt, PRN.dat, and LPT1.unity3d are all rejected because the base name matches a reserved device name. If you need a file named like a reserved device, prefix it with another word — MyCON.txt is valid where CON.txt is not.

Filename characters worth considering carefully

Beyond the strictly forbidden characters, several characters are permitted but produce friction in common workflows:

CharacterStatusFriction
SpaceAllowedRequires quoting in PowerShell paths
Single quote 'AllowedConflicts with single-quoted strings in scripts
Ampersand &AllowedTreated as command separator in some shells
Percent %AllowedTreated as variable delimiter in batch files
Exclamation !AllowedTreated as variable delimiter in batch with delayed expansion
Caret ^AllowedTreated as escape character in batch
Tilde ~AllowedUsed in Windows short-name aliases
Hash #AllowedTreated as anchor in some web contexts
Period in middleAllowedCan be confused with extension delimiter

For mod project assets, the safest character set is letters, digits, hyphens, underscores, and a single period before the extension. Spaces in user-facing folder names are acceptable; spaces in script-referenced filenames are best avoided.

The extension rename problem

Renaming a file extension changes how Windows classifies the file but does not change the file's contents. If you rename Crate.dat to Crate.txt, the file's bytes remain identical. Windows now treats it as a text file and will open it with the default text editor. Unturned™ will no longer recognize it as a data file.

Windows shows a confirmation dialog when you change the extension during a rename. The dialog reads:

If you change a file name extension, the file might become unusable. Are you sure you want to change it?

Clicking Yes completes the rename. Clicking No cancels.

Did you know?

You can disable the extension change warning by going to Folder Options, the View tab, and checking Hide extensions for known file types. Do not do this. The warning is a safety net, and hiding extensions makes mod work harder.

Did you know?

The extension does not determine the file's actual format. The format is determined by the file's contents, specifically the first few bytes (the "magic number"). The extension only determines which application Windows uses to open the file by default. A file with a .txt extension can contain Unity bundle data, and a file with a .unity3d extension can contain plain text. The applications themselves will reject the mismatch when they try to parse the file.

Bulk renaming multiple files

Windows supports a simple bulk rename built into File Explorer.

  1. Select multiple files with Ctrl + click or Shift + click.
  2. Press F2 or right-click and choose Rename.
  3. The first selected file enters edit mode.
  4. Type a base name and press Enter.
  5. Every selected file is renamed to the typed name followed by a sequence number in parentheses, such as Crate (1).dat, Crate (2).dat, Crate (3).dat.

This built-in rename is suitable for simple sequential numbering. For more sophisticated bulk renaming (find and replace patterns, regular expressions, removing prefixes), use PowerShell with the Rename-Item cmdlet or a dedicated bulk rename utility.

Best practice

For project asset naming, choose a convention before you start renaming and apply it consistently. Common modder conventions include PascalCase (CrateLarge.dat), snake_case (crate_large.dat), and kebab-case (crate-large.dat). Pick one and stay with it across the entire project.

Naming convention comparison

The choice of naming convention affects readability, scriptability, and cross-platform compatibility. The four common conventions:

ConventionExampleProsCons
PascalCaseCrateLarge.datMatches C# class names; compactHard to read at small sizes
camelCasecrateLarge.datCommon in JavaScript and JSONWord breaks less visible
snake_casecrate_large.datEasy to read; cross-platform safeSlightly longer than PascalCase
kebab-casecrate-large.datURL-safe; common in web workHyphens conflict with subtraction in code
Title CaseCrate Large.datMost readable for humansRequires quoting in scripts
SCREAMING_SNAKE_CASECRATE_LARGE.datVisually loud; signals constantsTiring to read in long lists

For Unturned™ mod project assets, the most common conventions are PascalCase for code-adjacent files (those referenced by C# scripts) and snake_case for cross-platform-friendly assets. Mixing conventions within a single project is acceptable when the categories are clearly separated by folder.

PowerShell bulk rename patterns

For sophisticated bulk renames, PowerShell's Rename-Item cmdlet supports patterns that File Explorer cannot.

powershell
# Rename all .png files in a folder by adding a prefix
Get-ChildItem -Path 'C:\Project\Assets\Icons' -Filter '*.png' | ForEach-Object {
    Rename-Item -Path $_.FullName -NewName "icon_$($_.Name)"
}

# Replace a substring in all matching files
Get-ChildItem -Path 'C:\Project\Assets' -Filter '*old*' | ForEach-Object {
    $newName = $_.Name -replace 'old', 'new'
    Rename-Item -Path $_.FullName -NewName $newName
}

# Add a numeric sequence with leading zeros
$i = 1
Get-ChildItem -Path 'C:\Project\Assets\Icons' -Filter '*.png' | Sort-Object Name | ForEach-Object {
    $newName = 'icon_{0:D3}.png' -f $i
    Rename-Item -Path $_.FullName -NewName $newName
    $i++
}

# Remove a prefix from filenames
Get-ChildItem -Path 'C:\Project\Assets' -Filter 'temp_*' | ForEach-Object {
    $newName = $_.Name -replace '^temp_', ''
    Rename-Item -Path $_.FullName -NewName $newName
}

# Change extension on all matching files
Get-ChildItem -Path 'C:\Project\Source' -Filter '*.txt' | ForEach-Object {
    $newName = $_.BaseName + '.dat'
    Rename-Item -Path $_.FullName -NewName $newName
}

The PowerShell approach scales to thousands of files and handles patterns the built-in File Explorer rename cannot. For mod projects with many regularly named assets, a PowerShell rename script saved alongside the project is a useful tool.

Best practice

Always run a dry-run of bulk rename scripts before executing them. PowerShell's -WhatIf flag shows what would happen without making changes: Rename-Item -Path ... -NewName ... -WhatIf. Reviewing the dry-run output catches script errors before they affect the file system.

Path length and total filename length

A filename itself can be up to 255 characters. The full path (drive letter, all folder names, and filename combined) was traditionally limited to 260 characters. Modern Windows supports longer paths when applications opt in, but many tools still enforce the 260 limit.

If a rename produces a path that exceeds the limit, Windows shows an error. The fix is usually to shorten an ancestor folder name rather than the filename itself.

The 260-character limit applies to the full path including the drive letter, every folder name with its backslash separator, and the filename with its extension. A path that starts with C:\Users\Long Username\Documents\Game Projects\... consumes substantial path budget before any project-specific folders are encountered.

Common mistake

A modder creates deeply nested folders such as C:\Users\Long Username\Documents\Game Projects\Unturned Mods\My First Mod\Working Files\Assets\Textures\High Resolution\ then tries to add a long filename inside. The total path may exceed 260 characters and the file cannot be created. Shorten the parent folders, especially the username and project name.

Common mistake

Modern Windows supports long paths when applications opt in through the registry or manifest, but many tools — including some versions of Unity Editor and many command-line utilities — still enforce the 260 limit. Opting into long paths in Windows does not guarantee every tool will accept them.

Recovering from a bad rename

If you renamed a file by accident or used the wrong name, press Ctrl + Z immediately. Windows undoes the most recent file operation including renames.

If you have already taken other actions and Ctrl + Z no longer reverses the rename, manually rename the file back using F2. If the file no longer opens correctly because the extension changed, rename the extension back to the original value and confirm the warning dialog.

If you renamed a file before saving an open document, save the open document under the correct name and delete the renamed orphan.

Bad rename scenarioRecovery
Just renamed, mistake noticed immediatelyCtrl + Z
Renamed extension by accident, file no longer opensF2, restore original extension, confirm warning
Renamed but cannot remember original nameCheck Recent files in associated application
Renamed in bulk, several files now wrongUse PowerShell to apply pattern reverse
Renamed and overwrote another fileCheck Recycle Bin; restore overwritten file if present
Renamed file referenced by scriptUpdate script reference or rename back
Renamed locked file failed silentlyConfirm rename did not partially apply; retry

Rename and file locks

A file that is locked by another application typically cannot be renamed. The lock prevents the directory entry from being updated. Common scenarios where this occurs:

  • A document open in Microsoft Word, Excel, or PowerPoint
  • A Unity Editor project file open in Unity
  • A media file currently playing in a media player
  • A log file currently being written by a service
  • An executable currently running
  • A configuration file being read by a service at the moment of the rename

The error message varies by Windows version but typically reads "The action can't be completed because the file is open in another program." The fix is to close the application holding the lock, or in some cases to find and stop the service that holds the lock.

Common mistake

Some applications hold a lock on a file for several seconds after the file appears to be closed. If a rename fails immediately after closing an application, wait a few seconds and retry. The lock typically clears within five seconds of the close.

Verifying a rename completed correctly

A rename either succeeds completely or fails completely; there is no intermediate state. Verifying success is therefore straightforward:

powershell
# Verify a rename
$oldPath = 'C:\Project\Assets\OldName.dat'
$newPath = 'C:\Project\Assets\NewName.dat'

if (-not (Test-Path $oldPath) -and (Test-Path $newPath)) {
    Write-Host 'Rename verified' -ForegroundColor Green
} else {
    Write-Host 'Rename incomplete' -ForegroundColor Red
}

For bulk renames, the verification extends to checking that every expected new name exists and no old name remains:

powershell
$renames = @(
    @{ Old = 'C:\Project\old1.dat'; New = 'C:\Project\new1.dat' },
    @{ Old = 'C:\Project\old2.dat'; New = 'C:\Project\new2.dat' }
)

foreach ($r in $renames) {
    if (-not (Test-Path $r.Old) -and (Test-Path $r.New)) {
        Write-Host "OK: $($r.Old) -> $($r.New)"
    } else {
        Write-Host "FAIL: $($r.Old) -> $($r.New)" -ForegroundColor Red
    }
}

Frequently asked questions

Why can I not rename this file? Most commonly because another application has the file open. Close the application and try again. Alternatively, the file may have a Read-only attribute set, which prevents renaming. Right-click, Properties, and uncheck Read-only.

Can I rename a file while it is open in another window? Usually not. Even some text editors hold a write lock that prevents renaming. Close the file in the other application first.

Why does my rename produce a "file already exists" error? The destination filename is already in use by another file in the same folder. Choose a different name or rename the existing file first.

Can I rename multiple files to entirely different names at once? Not through File Explorer. The built-in bulk rename only applies the same base name with sequential numbers. For different names, use PowerShell or a third-party bulk rename tool.

Why does the rename of a folder sometimes leave behind a Locked.dat or Thumbs.db file? Some Windows components and applications create hidden files inside folders that hold a lock on the folder. Until the lock is released, the folder cannot be renamed. The fix is usually to close the application that created the hidden file, or to manually delete the hidden file before renaming.

Can I rename a file from a search-results view? Yes. Select the file in the search results and press F2 or right-click and choose Rename. The file is renamed at its actual location, not just in the search results. This is useful for finding and renaming files that are scattered across multiple folders.

What is the safest way to rename many files according to a pattern? PowerShell with the -WhatIf flag on a dry run, followed by the actual run after reviewing the dry-run output. The dry-run approach catches script errors before they affect the file system. A third-party utility such as Bulk Rename Utility offers a graphical preview as an alternative.

Why does my rename succeed but the file appears with the old name in some applications? Some applications cache the file's name and do not refresh until they are restarted or until they explicitly re-read the file system. Restart the application to see the new name.

Can I rename a file to have no extension at all? Yes, but Windows shows the extension-removal warning dialog. Removing the extension causes Windows to not associate the file with any application, so double-clicking the file opens an Open With dialog. This is occasionally useful for files that should not be opened by mistake.

Why does the rename of a file in a OneDrive folder sometimes show a sync conflict? OneDrive treats the renamed file as a new file (with the new name) and considers the old file deleted. If the sync is incomplete when the rename occurs, OneDrive may produce a conflict file with a -copy or -Person's PC suffix. Wait for OneDrive sync to complete before renaming sync-managed files.

Can I rename a file to a name that differs only in case? NTFS preserves case but is case-insensitive for lookups. A rename from MyFile.txt to myfile.txt is allowed and the case change is preserved. Most applications treat the two as the same file but display the renamed case. Some cross-platform tools that interact with case-sensitive file systems (Linux servers, macOS HFS+) treat them differently.

Why is renaming a folder slower than renaming a file? Folder renames are still metadata-only operations and complete in milliseconds. The perceived slowness is sometimes due to File Explorer refreshing its view to reflect the new folder name, particularly for folders with many children. The rename itself is fast.

Best practices

  • Default to F2 for all single-file renames.
  • Pick a naming convention before starting a project and apply it consistently to every file.
  • Never rename a file extension unless you genuinely intend to change the file type. Confirm the warning dialog only when certain.
  • Press Ctrl + Z immediately if a rename goes wrong.
  • Keep folder paths short to avoid the 260-character path limit. Long usernames and deep project trees compound quickly.
  • For bulk renames, use PowerShell with -WhatIf for a dry run before the actual run.
  • Close applications that may hold a lock on a file before attempting to rename it.
  • Document your naming convention in a project README.txt so collaborators understand the rules.
  • Avoid spaces in filenames that will be referenced by scripts; use underscores or hyphens instead.
  • Verify large bulk renames with a script that checks each expected new name exists and no old name remains.

Appendix A: Bulk rename utility comparison

Several third-party bulk rename utilities offer features beyond what File Explorer and PowerShell provide. The principal options:

UtilityCostKey features
Bulk Rename UtilityFree for personal useGraphical preview, regex support, batch tagging
Advanced RenamerFreeScripted patterns, batch methods, EXIF data
PowerToys PowerRenameFreeBuilt into Microsoft PowerToys, regex support
Better File RenamePaidModern UI, scriptable rules, batch undo

For most mod project bulk renames, PowerToys PowerRename is the recommended starting point because it ships as part of Microsoft PowerToys (a free official Microsoft toolset) and offers regex support with a live preview.

Best practice

Install Microsoft PowerToys for access to PowerRename. PowerRename adds a right-click menu option that opens a graphical bulk-rename interface with regex preview. It is the most accessible bulk rename tool for users who prefer a graphical interface over PowerShell scripting.

Appendix B: Rename operation troubleshooting matrix

SymptomLikely causeResolution
Rename fails with "access denied"Permission issue or read-only attributeRun as administrator or uncheck Read-only
Rename fails with "file in use"Application holding lockClose application, retry
Rename fails with "filename already exists"Destination name collisionRename existing file first or choose different name
Rename produces "filename invalid"Reserved character or nameChoose a name following the rules above
Rename succeeds but file shows old nameApplication cacheRestart application
Rename of folder failsLocked hidden file insideShow hidden files, find and resolve lock
Extension warning appears unexpectedlyExtension changed by accidentCancel, retry without changing extension
Bulk rename produces unexpected namesScript error or wrong patternUse -WhatIf for dry run first
Rename fails silentlyAntivirus interferenceAdd temporary exclusion, retry
Rename succeeds but file no longer opensExtension changed, breaks associationRestore original extension

Appendix C: Rename operation glossary

  • Base name. The portion of a filename before the final period.
  • Extension. The portion of a filename after the final period.
  • Directory entry. The file-system record that names a file.
  • Metadata-only operation. A file-system operation that updates only directory entries.
  • Rename mode. The File Explorer state in which a filename is editable.
  • Atomic rename. A rename that either completes fully or does not occur.
  • Reserved character. A character that Windows forbids in filenames.
  • Reserved name. A name that Windows forbids as a base name due to legacy device-name reservations.
  • Naming convention. A consistent style for filenames within a project.
  • Bulk rename. A single operation that renames many files according to a pattern.
  • Dry run. A preview of what a bulk rename would do, without actually renaming.
  • Path length. The total character count of a file's full path.
  • Extension warning dialog. The Windows confirmation when a rename changes a file's extension.

Appendix D: Naming convention case studies

The convention chosen at the start of a project sets the pace of every subsequent file operation. The case studies below illustrate how different conventions worked in actual 57 Studios™ mod projects.

Case A: PascalCase for code-adjacent assets. A mod project that ships Unity bundles named to match C# class names. The C# code references the bundle by name through LoadAsset<T>("CrateLarge"). Matching the bundle name to the class name eliminates a mental translation step and reduces lookup errors. The convention is PascalCase throughout the asset pipeline.

Case B: snake_case for cross-platform data files. A mod project that ships data files consumed by both Windows and Linux Unturned™ servers. The convention is snake_case to avoid case-sensitivity issues on Linux. All data files use lowercase letters and underscores.

Case C: Numbered prefixes for ordered asset lists. A mod project containing a sequenced set of crate variants. The variants are named 001_basic_crate.dat, 002_reinforced_crate.dat, 003_locked_crate.dat. The numeric prefix sorts the variants in their intended order regardless of alphabetical sort. The convention is NNN_lowercase_name.ext.

Case D: Date-prefixed snapshots for backup folders. A mod project's backup folders are named with date prefixes: 2026-05-15_v1, 2026-05-16_v2, 2026-05-17_v3. The date prefix sorts the snapshots chronologically and lets the modder identify the most recent backup at a glance.

Case E: Tier-prefixed source folders. A mod project's source-stage folders are prefixed with underscores so they sort to the top: _Source, _Sandbox, _Internal. The underscore prefix sorts above letters in standard NTFS sort. Working folders (Assets, Bundles, Workshop) sort beneath the source folders without needing a prefix.

Each convention was chosen at project start and applied consistently. None of the projects mixed conventions within a category. The discipline saved hours across the project's life by eliminating naming-mismatch confusion.

Appendix E: Rename and project naming-convention checklist

For a new project, the naming-convention checklist below establishes the rules at the start:

  1. Choose a primary convention. PascalCase, snake_case, kebab-case, or Title Case. One primary convention per category of file.
  2. Document the convention in the project README. Include examples for each category.
  3. Define the categories. Code-adjacent, cross-platform data, user-facing folders, archive folders, backup folders.
  4. Establish ordered-list conventions. Numeric prefix style (NNN, NN, or N).
  5. Establish date-folder conventions. YYYY-MM-DD or YYYY-MM-DD_vN.
  6. Establish sort-control conventions. Underscore prefix for tier-1 folders.
  7. Reserve a glossary file. A _GLOSSARY.md in the project root documenting any abbreviations used in filenames.
  8. Apply the convention consistently from the first file. Late-breaking convention changes require bulk renames that are easy to get wrong.

The checklist is the foundation of long-term project hygiene. Projects that establish conventions at the start ship faster than projects that retrofit conventions mid-project.

Appendix F: Extended FAQ on rename operations

Why does Windows show two files with similar names after a rename — one with the new name and one as a shortcut? You may have used right-click drag and chosen Create shortcuts here, which produces a .lnk shortcut at the destination while the source file remains in place. The shortcut bears the original name with - Shortcut appended, and the source retains its original name. To clean up, delete the shortcut if it was unintended.

Can I rename multiple files to use sequential numbers without the parentheses Windows adds by default? The built-in File Explorer bulk rename adds (1), (2), (3) and so on. For sequential numbers without parentheses, use PowerShell:

powershell
$i = 1
Get-ChildItem -Path 'C:\Project\Assets' -Filter '*.png' | ForEach-Object {
    Rename-Item -Path $_.FullName -NewName ('asset_{0:D3}.png' -f $i)
    $i++
}

The format string '{0:D3}' produces a zero-padded three-digit number such as 001, 002, 003.

What happens to file shortcuts when the target file is renamed? A shortcut to a file stores the file's absolute path. After the target is renamed, the shortcut may automatically update its target path (Windows tracks recent renames to repair shortcuts) or it may break. If the shortcut breaks, right-click the shortcut, choose Properties, and update the Target field manually.

Can I rename a file and immediately rename it back to test something? Yes. Each rename is a separate file-system operation. There is no rate limit, no penalty, and no side effect from renaming and renaming back. Some file-watcher applications may emit a flurry of events during rapid renames, but the file itself is unaffected.

Why does the rename of a file in a network share sometimes fail with a sharing violation? Network shares can hold an "oplock" (opportunistic lock) on a file that a client has recently accessed. The oplock prevents another client from renaming the file until it expires. The oplock typically lasts seconds to minutes. Retry after a brief wait.

Can I rename a file from PowerShell while it is selected in File Explorer? Yes, but File Explorer's display may continue to show the old name until you click into the folder or press F5 to refresh. The rename completes successfully at the file-system level regardless of File Explorer's display state.

What is the difference between renaming a file and moving it with a new name? A rename is a metadata-only operation that changes the file's name without changing its parent folder. A move with a new name changes the file's parent folder and also its name. Both are metadata-only operations on the same drive, but the move requires updating both the source and destination folder's directory entries while the rename updates only one folder's entry.

Can I rename a folder while files inside it are open in applications? Sometimes. If the folder contains a file that an application has open, the folder rename may fail because the parent folder's directory entry cannot be updated while a child file is locked. Close applications using files in the folder before renaming the folder.

Why does the file's icon change after a rename? The icon may change if the rename changed the file's extension. Windows associates each extension with an icon, and a change in extension changes the icon. The file's contents are unchanged; only the visual representation in File Explorer is different.

Can I rename system files with F2? Most system files are protected by Windows from rename through standard means. Attempting to rename a system file produces an access-denied error or a prompt to provide administrator confirmation. Renaming system files is rarely advisable and is outside the scope of mod project file management.

Why does renaming a file change its sort position in File Explorer? File Explorer sorts by the current sort column (Name by default). After a rename, the file's position in the sort order updates to reflect the new name. If sorting is by Date Modified or Size, the position does not change because rename does not alter those properties.

Can I rename a file to a name in a different language or character set? Yes. NTFS supports the full Unicode character set, so filenames in any language are permitted. Some applications may have difficulty handling non-ASCII characters in filenames. For mod project assets, ASCII-only filenames are recommended for maximum tool compatibility.

Does rename preserve a file's NTFS alternate data streams? Yes. A rename does not affect the file's content or any associated alternate data streams. The streams remain attached to the renamed file.

Appendix G: Rename performance characteristics

Rename is among the fastest file-system operations because it modifies only directory entries. The performance characteristics below illustrate the consistency:

File sizeRename time
1 KB< 1 ms
1 MB< 1 ms
100 MB< 1 ms
1 GB< 1 ms
10 GB< 1 ms
100 GB< 1 ms

The flat performance profile across file sizes is the signature of a metadata-only operation. Contrast this with copy or cross-drive move, where the time scales linearly with file size.

For folder renames, the performance is similar — the rename updates the folder's directory entry in its parent, not the directory entries of any children. A folder containing thousands of files renames in the same time as a folder containing one file.

Did you know?

The metadata-only nature of rename is exploited by some atomic-write patterns in applications. An application writes to a temporary file, then renames it to the final name once writing is complete. The rename is atomic, so other applications watching the final path see the file appear fully formed at the moment of rename. This pattern is common in text editors that need to handle crashes without corrupting in-progress saves.

Appendix H: Rename pitfalls in mod project history

The case studies below document rename pitfalls encountered in actual 57 Studios™ mod project history. Each entry describes the pitfall, the resulting failure, and the recovery.

Pitfall A: Renaming a referenced bundle. A modder renamed a Unity bundle from CrateBundle.unity3d to Crate_Bundle.unity3d to align with the project's naming convention. The C# script that loaded the bundle was not updated. The mod failed to load with a missing-asset error at runtime. Recovery was to rename the bundle back to its original name or update the C# script's reference.

Pitfall B: Renaming an open file. A modder renamed a .dat configuration file while Unturned™ was running. The rename failed silently because Unturned held a lock. The modder did not notice the failure and assumed the rename succeeded. Later attempts to load the configuration failed because the expected new name did not exist. Recovery was to close Unturned and retry the rename.

Pitfall C: Renaming with a typo. A modder renamed a critical asset and introduced a typo in the new name (Cratte.dat instead of Crate.dat). The mod build process expected the correct name and produced a missing-asset error. Recovery was to F2 the typo'd file and correct the spelling.

Pitfall D: Bulk rename with wrong pattern. A modder ran a PowerShell bulk rename script with an incorrect pattern. Hundreds of files were renamed to names that did not match the project's convention. Recovery was a second PowerShell script that reversed the rename based on the pattern. The lesson learned was to always run bulk renames with -WhatIf first.

Pitfall E: Renaming through a sync conflict. A modder renamed a file in a OneDrive-synced folder while the file was still uploading. OneDrive produced a conflict file with a -copy suffix. The modder ended up with two files: the renamed file and the conflict file. Recovery was to identify which file held the correct contents (the modified version) and delete the other.

Pitfall F: Extension change without intention. A modder used F2 to rename a file but accidentally selected and edited the extension portion. The file became Crate.dat to Crate.txt. The extension warning dialog appeared and the modder clicked Yes without reading. The mod no longer recognised the file. Recovery was to F2 again and restore the original extension.

Appendix I: Rename and tooling integration

Many mod-development tools depend on filenames in specific ways. Renaming a file without considering tool integration is the most common cause of post-rename failures.

ToolRename impact
Unity EditorBundle and asset references update via internal GUIDs; some references may break
Unturned™File paths in .dat config files are matched literally; renames break references
BlenderLinked files in .blend references update when the linked file is re-opened
PhotoshopSmart Object references break when source files are renamed
Adobe IllustratorLinked image references break when source files are renamed
GitTreats rename as delete-plus-create unless tracked explicitly with git mv
Build scriptsHardcoded paths in scripts break when files are renamed
Visual Studio CodeProject workspace files lose their identity if renamed

Before renaming any file that is referenced by tooling, identify what references the file and update the references in the same operation. For Unity, the asset metadata GUID typically handles references automatically. For other tools, manual updates may be required.

Best practice

Maintain a rename-impact checklist for your project: which files are referenced by which tools, and what update is required for each. The checklist saves time when a rename breaks something downstream.

Appendix J: Rename automation patterns for mod project workflows

Beyond simple bulk renames, mod project workflows benefit from automation patterns that combine rename with other operations. The patterns below are documented across 57 Studios™ internal projects.

Pattern A: Versioned snapshot rename. When promoting a working file to a versioned snapshot, the workflow is to copy the working file, then rename the copy with a version suffix. The combination produces a _v3 snapshot alongside the working file without disturbing the working file's name.

powershell
$working = 'C:\Project\Code.gs'
$snapshot = 'C:\Project\Code_v3.gs'
Copy-Item -Path $working -Destination $snapshot

Pattern B: Pre-edit safety rename. Before a risky edit to a single file, rename the file to a _backup suffix, then copy the renamed file back to the original name. The result is a _backup snapshot in the same folder alongside the in-edit file.

powershell
$path = 'C:\Project\Code.gs'
Rename-Item -Path $path -NewName ($path -replace '\.gs$', '_backup.gs')
Copy-Item -Path ($path -replace '\.gs$', '_backup.gs') -Destination $path

Pattern C: Date-stamped archive rename. When archiving a file, rename it with a date prefix so it sorts chronologically in the archive folder. This works well for log files, daily reports, and one-time data exports.

powershell
$today = Get-Date -Format 'yyyy-MM-dd'
$source = 'C:\Project\Output\daily_report.csv'
$archive = "C:\Project\Archive\${today}_daily_report.csv"
Move-Item -Path $source -Destination $archive

Pattern D: Sequential numbering rename. When importing a series of files that need to be sequentially numbered, a rename script reads the input order and assigns numbered names. The pattern is useful for animation frames, sequential renders, or any series.

powershell
$i = 1
Get-ChildItem -Path 'C:\Project\Import' -Filter '*.png' | Sort-Object Name | ForEach-Object {
    $newName = 'frame_{0:D4}.png' -f $i
    Rename-Item -Path $_.FullName -NewName $newName
    $i++
}

Pattern E: Convention-conformance rename. When a project's naming convention changes, a bulk rename script applies the new convention to all existing files. The pattern is risky and should always be run with -WhatIf first.

powershell
# Convert snake_case filenames to PascalCase
Get-ChildItem -Path 'C:\Project\Assets' -File | ForEach-Object {
    $oldName = $_.BaseName
    $extension = $_.Extension
    $newName = ($oldName -split '_' | ForEach-Object {
        $_.Substring(0,1).ToUpper() + $_.Substring(1)
    }) -join ''
    Rename-Item -Path $_.FullName -NewName "$newName$extension" -WhatIf
}

The script reads each filename, splits on underscores, capitalises each word, and joins without separators. The -WhatIf flag at the end produces a dry-run report; remove the flag for the actual rename after the dry-run is reviewed.

Best practice

For convention-conformance renames affecting more than ten files, run with -WhatIf first, save the dry-run output to a file, review the proposed renames line by line, and only then run without -WhatIf. The discipline catches script errors before they affect the file system.

Appendix K: Rename and the file-versioning practice

The 57 Studios™ file-versioning practice — keeping copies of working files at _v1, _v2, _v3 suffixes alongside the canonical working file — depends on rename in a specific way. The canonical working file keeps its name; the versioned copies are named with a _vN suffix. The rename operation never targets the canonical file; it only creates the versioned copies.

The pattern is: copy the working file, then rename the copy with a version suffix. The canonical file is never renamed, so all tool integrations that reference the canonical name continue to work. Older versioned copies remain at their original _vN names indefinitely as a rollback resource.

OperationWhat gets renamed
Create new version snapshotThe copy gets _vN suffix; canonical file untouched
Promote a snapshot to canonicalCanonical file is overwritten with snapshot content; no rename
Rollback to a snapshotCanonical file is overwritten with snapshot content; no rename
Archive old snapshotsOld _vN files move to archive folder; no rename

The discipline keeps rename out of the rollback pathway. Rollback is always a copy, never a rename. This avoids the failure mode where a rename moves the canonical filename onto a snapshot and leaves the project without a canonical file under the expected name.

Next steps

With copy, move, and rename covered, the final core operation is creating folders to organize your files. Continue to How to Create a New Folder to learn the methods for creating folders and the structure conventions that work well for mod projects.

For a deeper look at how rename interacts with the rest of the file-management workflow, refer back to How to Copy a File and How to Move a File. The three operations together form the foundation of mod project file management, and a modder fluent in all three can reorganise a project quickly and safely.