Change Folder Modified Date in Windows: Complete Guide
In this article
Yes, you can change the modified date of a folder in Windows, but you cannot do it through the standard File Explorer properties window. Windows treats the "Date Modified" timestamp as a system-generated record of when the contents of a folder were last changed; therefore, there is no built-in "Edit" button for this field. To change it, you must use Windows PowerShell, a built-in command-line tool that allows you to manually overwrite the system timestamp for any file or directory.
Changing a folder's modified date is useful for organizing archives, restoring the appearance of folders after a bulk migration, or ensuring that backup software recognizes a folder as needing an update. Because you are interacting with the file system at a deeper level than the graphical user interface (GUI), you will need to use a specific command syntax. Note that labels and menu appearances may differ slightly depending on your version of Windows (Windows 10 vs. Windows 11) or your regional system settings.
What You'll Need
- A computer running Windows 10 or Windows 11.
- Administrator privileges (required to modify system metadata for folders located in protected areas like C:\Program Files or C:\Windows).
- The exact file path of the folder you wish to modify.
- The specific date and time you want to set.
Step-by-Step
- Locate the Target Folder: Open File Explorer and navigate to the folder you want to change. Right-click the folder and select "Copy as path" (Windows 11) or hold Shift and right-click to select "Copy as path" (Windows 10). This ensures you have the exact directory string, including quotes, which prevents errors caused by spaces in folder names.
- Launch Windows PowerShell: Click the Start button, type "PowerShell" into the search bar. Right-click on "Windows PowerShell" and select "Run as administrator". This is a critical step; if you run it as a standard user, you may receive an "Access Denied" error when attempting to modify folders outside of your user profile.
- Prepare the Command Syntax: The command used to change the modified date is
(Get-Item "Path").LastWriteTime = "Date". You will replace "Path" with your copied folder path and "Date" with your desired timestamp. - Enter the Path: In the PowerShell window, type
(Get-Item, followed by a space. Paste the path you copied earlier. For example, if your folder is on the desktop, it will look like(Get-Item "C:\Users\YourName\Desktop\MyFolder"). Be sure to close the parenthesis. - Assign the New Date: Immediately after the closing parenthesis, type
.LastWriteTime = "YYYY-MM-DD HH:MM AM/PM". For example, to set the date to December 1st, 2023, at 10:30 AM, you would type.LastWriteTime = "2023-12-01 10:30 AM". - Execute the Command: Your full command should look like this:
(Get-Item "C:\Users\YourName\Desktop\MyFolder").LastWriteTime = "2023-12-01 10:30 AM". Press Enter. - Verify the Change: Return to File Explorer. If the date does not update immediately, right-click an empty space in the folder directory and select "Refresh". The "Date Modified" column should now reflect the exact date and time you entered in PowerShell.
Common Mistakes
One of the most frequent errors is forgetting the quotation marks around the file path. In Windows, paths often contain spaces (e.g., "New Folder"). Without quotes, PowerShell treats the space as a separator between two different commands, resulting in a "positional parameter" error. Always wrap your path in double quotes.
Another common mistake is using the wrong date format. While PowerShell is flexible, the most reliable format is YYYY-MM-DD. If you use a format like DD-MM-YYYY, PowerShell may misinterpret the month and day depending on your system's regional settings, or it may throw an "Unable to parse怨 error. Stick to the ISO-style format to ensure accuracy.
Users also frequently confuse the "Date Modified" with the "Date Created". The .LastWriteTime property specifically targets the modified date. If you intend to change when the folder was first made, you must use .CreationTime instead. Attempting to change the creation date using the write-time command will leave the original creation date intact, which can be confusing if you are trying to make a folder look entirely "old."
Tips
If you need to change the modified date for multiple folders at once, you can use a wildcard character. For example, using Get-ChildItem "C:\MyParentFolder\*" | ForEach-Object { $_.LastWriteTime = "2023-12-01" } will apply the same date to every subfolder and file within that directory. This is significantly faster than running the command individually for dozens of folders.
To make the process faster for frequent use, you can create a simple text file, paste your customized command into it, and save it as a .ps1 file (a PowerShell script). To run it, you can right-click the script and select "Run with PowerShell", provided your execution policy allows script running. This removes the need to manually type the path and date every time.
When selecting a date, remember that Windows tracks time down to the millisecond. If you only provide the date (e.g., "2023-12-01"), Windows will typically default the time to 12:00 AM. If you want the folder to look naturally modified during business hours, always include a specific time like "2:15 PM".
Troubleshooting
If you receive an "Access to the path is denied" error, it is almost certainly a permissions issue. First, ensure you launched PowerShell as an Administrator. If you are still blocked, the folder may be owned by the "SYSTEM" or "TrustedInstaller" account. You will need to right-click the folder in File Explorer, go to Properties > Security > Advanced, and change the Owner to your current user account before the PowerShell command will work.
If the command executes without an error but the date in File Explorer remains unchanged, the issue is likely a display lag. File Explorer does not always poll the file system for metadata updates in real-time. Press F5 while inside the parent directory to force a refresh of the view. If that fails, try closing and reopening the File Explorer window.
In cases where you see a "Cannot find path" error, double-check the path for typos. A common issue occurs when users copy the path but accidentally include an extra space at the beginning or end of the string inside the quotes. Ensure the path starts exactly with the drive letter (e.g., C:\) and ends exactly with the folder name.
Frequently Asked Questions
Does changing the modified date affect the files inside the folder?
No. Changing the modified date of a folder only changes the metadata of the directory container itself. It does not alter the "Date Modified" timestamps of any individual files stored inside that folder.
Can this be undone?
There is no "Undo" button for metadata changes. To revert the date, you must either remember the original date and manually set it back using the same PowerShell method or restore the folder from a previous backup.
Will this change be visible to other people if I share the folder?
Yes. The modified date is stored as part of the file system metadata. If you move the folder to another Windows PC or share it over a local network, the new modified date will be visible to other users.
Is it possible to change the date using only the Properties menu?
No. The Windows Properties menu is read-only for timestamps. You must use a command-line tool like PowerShell or a third-party utility to modify these values.
Does this work on external hard drives or USB sticks?
Yes, as long as the drive is formatted with a Windows-compatible file system like NTFS or exFAT. If the drive is formatted in a system that does not support these timestamps, the changes may not persist.
Will changing the date trigger an antivirus scan?
Generally, no. Changing a timestamp is a metadata operation and does not modify the actual binary content of the folder or its files, so it is not typically flagged as suspicious activity.