How to Change a File Name on Any Device or Operating System
Renaming a file is one of the most basic file management tasks — but the exact steps depend on your operating system, the type of file, and where it's stored. Whether you're on Windows, macOS, Linux, Android, or iOS, here's exactly how it works across each platform, plus what to watch out for when you do it.
Why Renaming Files Matters
A clear file naming system makes it faster to search, sort, and share your work. Poorly named files — "Document1.docx," "final_FINAL_v3.pdf" — are one of the most common sources of confusion in both personal and professional workflows. Renaming is simple, but doing it correctly (especially with file extensions) matters more than most people realize.
How to Change a File Name on Windows
Windows gives you several ways to rename a file:
Method 1 — Right-click:
- Right-click the file in File Explorer
- Select Rename from the context menu
- Type the new name and press Enter
Method 2 — Single slow-click: Click the file once to select it, pause briefly, then click the file name again (not a double-click). The name field becomes editable.
Method 3 — F2 shortcut: Select the file and press F2 on your keyboard. This is the fastest method for power users.
Method 4 — Command Prompt: For batch renaming or scripting, use:
rename "oldname.txt" "newname.txt" 💡 Important: When renaming on Windows, you'll see the full file name including the extension (e.g., .docx, .jpg, .mp4). Be careful not to accidentally delete or change the extension — doing so can make the file unreadable by the associated program. Windows will warn you, but it won't stop you.
How to Change a File Name on macOS
Method 1 — Single click: In Finder, click the file once to select it, then click directly on the file name text. A text box appears around the name — edit it and press Return.
Method 2 — Right-click: Right-click (or Control-click) and select Rename from the menu.
Method 3 — Get Info: Press Command + I to open the Info panel, where you can edit the name field at the top.
Method 4 — Terminal:
mv /path/to/oldname.txt /path/to/newname.txt macOS typically hides file extensions by default, which reduces the risk of accidentally breaking them. You can toggle extension visibility in Finder preferences.
How to Change a File Name on Linux
On Linux, renaming is done through the file manager (GUI) or terminal:
GUI: Right-click the file in your file manager (Nautilus, Dolphin, Thunar, etc.) and select Rename.
Terminal using mv:
mv oldfilename.txt newfilename.txt Terminal using rename (for batch renaming):
rename 's/oldtext/newtext/' *.txt The rename command syntax varies slightly between distributions — the Perl-based version (common on Debian/Ubuntu) uses regex patterns, while some distros ship a simpler POSIX version.
How to Rename Files on iPhone or iPad (iOS/iPadOS)
In the Files app:
- Tap and hold the file
- Select Rename from the pop-up menu
- Type the new name and tap Done on the keyboard
In apps like Photos, you can't rename individual photos directly through the standard interface — the file name is managed by the system. Some third-party apps provide access to raw file names if that level of control is important to you.
How to Rename Files on Android
The process varies depending on your Android version and device manufacturer:
Using the Files app (Google Files or manufacturer app):
- Long-press the file
- Tap the three-dot menu or look for a Rename option
- Edit the name and confirm
Some Android launchers and file managers handle this slightly differently, so the exact menu label may vary.
Renaming Files in Cloud Storage 🌐
| Platform | How to Rename |
|---|---|
| Google Drive | Right-click file → Rename (web); tap three-dot menu → Rename (mobile) |
| OneDrive | Right-click → Rename (web); long-press → Rename (mobile) |
| Dropbox | Right-click → Rename (web); tap three-dot icon → Rename (mobile) |
| iCloud Drive | Use Files app on iOS or Finder on macOS |
Cloud renaming is generally safe — the file's shareable link may update or break depending on the platform, so check if you've shared the file before renaming it.
What to Watch Out For When Renaming Files
File extensions: The part after the dot (.pdf, .png, .xlsx) tells your OS which program opens the file. Changing or removing it can make the file appear broken or unreadable.
Special characters: Avoid using / : * ? " < > | in file names — these are reserved by most operating systems and can cause errors, especially when moving files between systems.
Synced or shared files: Renaming a file in a synced folder (Dropbox, OneDrive, Google Drive) renames it everywhere. If collaborators have bookmarked or linked to that file, their links may break.
Case sensitivity: Linux file systems are case-sensitive — Report.txt and report.txt are two different files. Windows and macOS are generally case-insensitive, though macOS can be formatted either way.
Batch renaming: If you're renaming dozens or hundreds of files, dedicated tools exist for every platform — from built-in options in macOS Finder (select multiple files, right-click, Rename) to third-party apps like Advanced Renamer on Windows or the rename command on Linux.
How straightforward renaming feels depends heavily on your setup — whether you're working with local files or cloud-synced ones, whether you're on a managed device with restricted permissions, or whether you're dealing with files that other people or systems depend on. The mechanics are simple; the implications shift based on context.