https://github.com/sunsetquest/tool-to-copy-file-date-between-directory-structures
A tool to copy the file date/time from one directory structure(or tree) to another.
https://github.com/sunsetquest/tool-to-copy-file-date-between-directory-structures
Last synced: 11 months ago
JSON representation
A tool to copy the file date/time from one directory structure(or tree) to another.
- Host: GitHub
- URL: https://github.com/sunsetquest/tool-to-copy-file-date-between-directory-structures
- Owner: SunsetQuest
- Created: 2017-11-03T00:15:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-04T19:16:58.000Z (over 8 years ago)
- Last Synced: 2025-03-24T09:25:30.323Z (about 1 year ago)
- Language: C#
- Size: 202 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tool-To-Copy-File-Date-Between-Directory-Structures
A tool to copy the file date/time from one directory structure(or tree) to another.

## Description
Given two nearly identical folder trees (or structures), this tool will copy over just the file (accessed/modified/created) dates from a source directory to a target directory. Files that cannot be found and matched up with a source file are skipped.
## Use Cases
Some tools import a directory tree and then export it to some other folder but don't keep the accessed, modified or created intact. This tool can be used to copy over just the dates.
Say a folder structure was copied over using a command like xcopy. After the copy it is relized that these the dates were not copied. If for some reason you cannot re-copy the files, maybe because the new files are already being used, then you could use this tool to copy over just the dates.
## USAGE:
CopyDirDates "Source Directory" "Destination Directory" [Options]
### Options:
"Source Directory" The directory where to get the dates. (Quotes required if path has spaces.)
"Dest. Directory" The directory where the dates will be applied to. (Quotes required if path has spaces.)
-CopyModified Copies over the modified datetime.
-CopyCreated Copies over the created datetime.
-CopyAccessed Copies over the last Access datetime.
-CopyAll Same as: -CopyModified -CopyCreated -CopyAccessed
-ExcludeSubFolders Excludes subfolders (Top Directory Only)
-Preview Only displays the changes would be made applied.
## Example
CopyDirDates "C:\My Folder1" D:\Folder2 -CopyAll -Preview
The below example would go through each file in D:\folder2 and then find the matching file(by location) in C:\My Folder1. For example, for the file D:\Folder2\mySubFolder\myPicture.jpg the command below would set the date(s) on this file based on the file C:\My Folder1\mySubFolder\myPicture.jpg.
## Download
[Download (4KB)](https://github.com/SunsetQuest/Tool-To-Copy-File-Date-Between-Directory-Structures/raw/master/CopyDirDatesTool.zip) (SHA1: 03A873FFBC248FBEF91AF08CF116C6D4B12CED6B)