Change Creation Modified Date on File
Yes, you can change the creation and modified dates on a file, but the method depends on your operating system and the type of file. On Windows, you can use PowerShell commands or third-party tools; on macOS, you can use the touch command in Terminal or a dedicated app; on Linux, touch and debugfs are common options. This article explains the built-in methods, the limitations you’ll face, and how to choose the right approach.
Why Change File Dates?
You might need to adjust a file’s timestamp for several legitimate reasons:
- Organizing photos and videos – when a camera’s clock was wrong, or you scanned old prints and want the digital file to match the original date.
- Testing software – developers sometimes need files with specific timestamps to test backup, sync, or build scripts.
- Restoring order – after moving files between systems, the creation date may be lost or reset, and you want to correct it.
- Legal or archival purposes – you may need to correct a timestamp that was recorded incorrectly.
It’s important to note that changing dates can be seen as tampering with evidence in legal contexts, so always consider the implications before doing so.
How File Dates Work
Every file has three main timestamps:
- Creation (birth) time – when the file was first created on that volume.
- Modified time – when the file’s content was last written.
- Access time – when the file was last read.
On Windows, the creation time is stored in the NTFS file system and is not easily changed through the GUI. On macOS, the creation time is stored in the HFS+ or APFS metadata. On Linux, the creation time (also called “birth time”) is available on some file systems (like ext4) but is not always exposed.
When you copy a file, the creation time on the destination is usually set to the current time, not the original. This is why you might want to change it after a copy.
Changing Dates on Windows
Windows does not offer a built-in way to change the creation date through File Explorer. You have two main options:
Using PowerShell
PowerShell can modify the creation and last write times. Open PowerShell as Administrator and use the following commands:
- Set the creation time:
(Get-Item "C:\path\to\file.txt").CreationTime = "2023-01-15 10:30:00" - Set the modified time:
(Get-Item "C:\path\to\file.txt").LastWriteTime = "2023-01-16 14:45:00"
You can also use the Set-ItemProperty cmdlet. For example:
Set-ItemProperty -Path "C:\path\to\file.txt" -Name CreationTime -Value "2023-01-15 10:30:00"
These commands work on NTFS volumes. On FAT32 or exFAT, the creation time may not be supported.
Using Third-Party Tools
Many free utilities (like BulkFileChanger or Attribute Changer) provide a graphical interface to change dates. These tools often let you adjust multiple files at once and even add or subtract time offsets.
Changing Dates on macOS
macOS does not have a built-in GUI to change creation dates, but you can use the Terminal with the touch command. However, touch only changes the modification and access times, not the creation time. To change the creation time on macOS, you need to use a third-party tool or a workaround:
- Use the
touchcommand to set the modification time:touch -t 202301151030 file.txt(format is YYYYMMDDhhmm). - To change the creation time, you can use a tool like
SetFile(part of the Command Line Tools) or a GUI app like A Better Finder Attributes.
The SetFile command example: SetFile -d '01/15/2023 10:30:00' file.txt (note the format is MM/DD/YYYY HH:MM:SS).
Changing Dates on Linux
On Linux, the touch command can set the modification and access times, but not the creation time. For example:
touch -t 202301151030 file.txt sets the modification time to January 15, 2023, 10:30.
To change the creation time on Linux, you need to use debugfs on ext4 file systems. This requires root access and unmounting the partition. The process is more complex and not recommended for casual users. Many Linux distributions do not expose the creation time at all, so you may need to use a different file system or a third-party tool.
Common Problems and Limitations
- File system support – FAT32 and exFAT do not support creation times, so you cannot change them on USB drives formatted that way.
- Permissions – You need write permission to the file and often admin/root rights to change dates.
- Copy vs. move – Moving a file within the same volume preserves dates, but copying does not. Use “move” when you want to keep the original timestamps.
- Cloud sync – If the file is synced to a cloud service, changing dates locally may be overwritten by the sync process.
- System files – Some system files are protected, and changing their dates may cause issues.
How to Choose the Right Method
Consider these factors when deciding which method to use:
- Number of files – For a single file, a command line or a simple tool is fine. For hundreds, you need a batch tool.
- Operating system – Use the native methods (PowerShell, Terminal) or a cross-platform tool.
- File system – Check if the volume supports creation times.
- Technical comfort – If you’re not comfortable with commands, use a GUI utility.
Frequently Asked Questions
Can I change the creation date of a file in Windows File Explorer?
No, File Explorer does not allow you to change the creation date. You must use PowerShell or a third-party utility.
Will changing the modified date affect the file’s content?
No, changing the timestamp does not alter the file’s content. It only changes the metadata.
Does changing the creation date work on all file systems?
No. NTFS and APFS support creation times, but FAT32 and exFAT do not. On Linux, ext4 supports it but not all tools expose it.
Can I change the date on a file that is read-only?
You need write permission to change timestamps. If the file is read-only, you must remove the read-only attribute first.
Is it legal to change file dates?
It is legal in most contexts, but if you are altering evidence for a legal case, it could be considered tampering. Always be transparent about changes.
How do I change the date on multiple files at once?
Use a batch tool like BulkFileChanger (Windows) or A Better Finder Attributes (macOS). You can also write a script that loops through files.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.