How to Change File Dates on Windows and Mac
This guide shows you how to change the creation, modification, and last opened dates of files on both Windows and Mac. You’ll learn built-in methods and free tools, what to prepare, and how to avoid common pitfalls.
What You’ll Need
- Access to the file(s) you want to modify
- Administrator or owner permissions for the file (to change dates, you need write access)
- For Windows: a free third-party tool like BulkFileChanger or Attribute Changer (since Windows doesn’t allow editing dates natively)
- For Mac: Terminal (built-in) or a free app like A Better Finder Attributes (optional)
- Backup of important files (recommended, though changing dates rarely damages content)
Step-by-Step
On Windows
- Understand the limitation: Windows Explorer only shows dates, it does not let you edit them. You’ll need a third-party tool.
- Download a reliable tool: Search for “BulkFileChanger” (by NirSoft) or “Attribute Changer” (by LTRData). Both are free and widely used. Download from the official site or a trusted mirror.
- Extract and run: Unzip the downloaded file (if needed) and run the executable (e.g., BulkFileChanger.exe). No installation is usually required.
- Add files: In the tool, go to File > Add Files (or drag and drop your files into the list). You can add multiple files at once.
- Select the files: Click on the files you want to change. Use Ctrl+click for multiple, or Ctrl+A to select all.
- Open the change dialog: Go to Actions > Change Attributes (or Change Time Attributes in Attribute Changer).
- Set the dates: Check the boxes next to Created, Modified, and/or Accessed (depending on what you want to change). Enter the desired date and time, or use the calendar picker.
- Apply: Click OK or Do It. The tool will update the dates immediately.
- Verify: Open Windows Explorer, right-click the file, and select Properties to see the new dates.
On Mac
- Open Terminal: Go to Applications > Utilities > Terminal.
- Navigate to the file: Use the
cdcommand to go to the folder containing your file. For example:cd /Users/YourName/Documents - Change the modification date: Use the
touchcommand with the-tflag. The format is[[CC]YY]MMDDhhmm[.SS]. For example, to set the modification date to January 15, 2025, at 10:30 AM, type:touch -t 202501151030 filename.ext - Change the creation date: The
touchcommand doesn’t change creation date. You need to useSetFile(comes with Xcode tools) or a third-party app. If you haveSetFile, use:SetFile -d '01/15/2025 10:30:00' filename.ext - If SetFile is not installed: Install Xcode command line tools by typing
xcode-select --installin Terminal, then try again. - Alternative for both dates: Use a free app like A Better Finder Attributes. Drag your file into the app, set the dates, and click Apply.
Common Mistakes
- Using the wrong date format: On Mac,
touchuses a specific format (YYYYMMDDhhmm). A common mistake is using slashes or dashes, which will cause an error. - Forgetting the time zone: When you set a date, the system may interpret it in your local time zone. If you need a specific UTC time, calculate the offset.
- Changing dates on system files: Modifying dates on system files (e.g., in C:\Windows or /System) can cause issues. Stick to your own user files.
- Not having write permission: If you get an “access denied” error, you may need to run the tool as administrator (Windows) or use
sudo(Mac) – but be very careful with sudo. - Overwriting the original date: Some tools let you add or subtract days instead of setting an absolute date. Double-check that you’re using the “set” option, not “add” or “subtract”.
Tips
- Batch change: Both Windows tools and Mac’s
touchcan handle multiple files at once. Select all files in the tool, or use wildcards in Terminal (e.g.,touch -t 202501151030 *.jpg). - Use a script: On Mac, you can write a small shell script to change dates for many files automatically.
- Test on a copy: If you’re unsure, duplicate a file and test the date change on the copy first.
- Keep a record: If you’re changing dates for organization, note the original dates in a spreadsheet before changing.
- Check the file system: On Mac, APFS and HFS+ both support creation dates, but some external drives (like FAT32) may not store them correctly. On Windows, NTFS supports all three dates, but FAT32 only supports modified and creation (with limited resolution).
Troubleshooting
- Error “Invalid argument” on Mac: This usually means the date format is wrong. Re-check the syntax:
touch -t [[CC]YY]MMDDhhmm[.SS]. For example,touch -t 202501151030(no spaces). - Date doesn’t change after using a Windows tool: Make sure you clicked “Apply” or “OK” after setting the dates. Also, check if the file is read-only – if so, uncheck the read-only attribute first.
- Creation date still shows old value on Mac: The
touchcommand only changes modification and access dates. UseSetFile -dfor creation date. IfSetFileis not found, install Xcode command line tools. - Changes revert after syncing: If the file is in a cloud folder (OneDrive, Dropbox, iCloud), the cloud service may overwrite the dates during sync. Disconnect from the cloud temporarily, change the dates, then reconnect.
- Permission denied on Windows: Right-click the tool and select “Run as administrator”. If that fails, take ownership of the file via Properties > Security > Advanced.
Frequently Asked Questions
Can I change file dates without any software on Windows?
No, Windows does not provide a built-in way to edit file dates. You need a third-party tool or a PowerShell script (which is still a form of software).
Does changing file dates affect the file content?
No, changing dates only alters metadata. The actual data (text, images, etc.) remains untouched.
Can I change the date to a future date?
Yes, you can set any date, past or future, as long as the file system supports it. There’s no restriction.
Why does the “Accessed” date keep changing?
The “Accessed” date updates every time the file is opened or read. To prevent this, you can disable last access time updates in Windows via the registry (not recommended for most users) or simply accept that it will change.
Will changing dates on a Mac trigger any security warnings?
No, it’s a normal file operation. However, if you use sudo on system files, you might see a warning about modifying system files.
Can I change dates on files stored on an external drive?
Yes, as long as the drive’s file system supports the date attributes. NTFS and APFS work fine. FAT32 and exFAT have limitations (e.g., creation date resolution is 10 ms, and accessed date is not stored).
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.