[REQ] "Copy date/timestamp ONLY" in SyncDirs+Attr.

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

[REQ] "Copy date/timestamp ONLY" in SyncDirs+Attr.

Post by *StatusQuo »

From time to time I have to update several old files, without changing their date/time stamp.
I keep backups, where copies of the files and their original time stamp resist (the Editmode of FileCompare-Tool also creates backups).

To now (after editing) easily transfer back the old time stamps from the backup files to the original files (without typing them manually):

:arrow: In Synchronize Dirs function I'd appreciate the option:
"After copying set both files to destination file time"

Maybe easier to implement instead (but still quite useful):
"ONLY copy date/time information" (without copying any file contents).

:arrow: In F5 Copy dialog the first option above ("After copying...") could be useful, too.

Manual function for single files:
:arrow: In File / Change Attributes there could be a Button
"Load last date/time".

The info for this function is already saved by TC: when marking multiple files, then the values are automatically set to the last used ones - exact the possibility that I miss for a single file.

Actual workaround with Change Attributes:
Let File-Compare/Editmode create a BAK-file, pickup the date from this file, mark BAK-file + original file to paste the date of BAK-file to both files.


It would be great if these options could be added.
Does somebody perhaps know of an existing packer plugin that can do similar copying ("After copying set both files to destination file time")?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Another request for this feature
"ONLY copy date/time information" (without copying any file contents).
in the german forum: Dateidatum synchronisieren?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
chrizoo
Senior Member
Senior Member
Posts: 349
Joined: 2008-03-12, 02:42 UTC

Post by *chrizoo »

I'm not sure, I think I read somewhere this feature will be in the next version, but if not, I second the motion.
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1015
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

In case you're interested here's a small AutoIt script that I wrote for exactly that purpose. It recursively copies folder dates and can easily be modified to copy files dates too.

Code: Select all

Dim $sf, $df

$sf = FileSelectFolder("Source folder","","","C:\")
If $sf = "" Then Exit

$df = FileSelectFolder("Dest. folder","","","D:\")
If $df = "" Then Exit

$start = MsgBox(1,"Transfer (sub)folder date/time from ", $sf & @crlf & " to" & @crlf &  $df & @crlf & "?")

If $start == 1 Then 
	ForEach("*.*" , $sf, $df)
	MsgBox(0,"Done", "Done!")
EndIf
Exit

Func ForEach($Mask, $sourcepath, $destpath)

	Local $search, $file , $newSpath, $newDpath, $File_Date
	FileChangeDir($sourcepath)
	$search = FileFindFirstFile($Mask)

	If $search == -1 Then
		Return
	EndIf

	While 1
		$file = FileFindNextFile($search) 
		If @error Then ExitLoop
		If StringInStr(FileGetAttrib($file),"D") Then 
			If FileExists($destpath & "\" & $File) Then
				If StringInStr(FileGetAttrib($destpath & "\" & $File),"D") Then 
					$sourcetime = FileGetTime($File,0,1)
					FileSetTime($destpath & "\" & $File,$sourcetime,0)
					$sourcetime = FileGetTime($File,1,1)
					FileSetTime($destpath & "\" & $File,$sourcetime,1)
					$sourcetime = FileGetTime($File,2,1)
					FileSetTime($destpath & "\" & $File,$sourcetime,2)
				EndIf
			EndIf
			$newSpath = $sourcepath & "\" & $File
			$newDpath = $destpath & "\" & $File
			ForEach("*.*",$newSpath,$newDpath)
			FileChangeDir($sourcepath)
		EndIf
	WEnd
FileClose($search)
EndFunc

StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2ZoSTeR
Thanks, looks promising.

I'm working on an external tool, too, when I find the time. The basic functions are quite ready, the interface for TC is not.
I'll let you know if it's in a state for releasing.

Still hoping that a future version of TC will have an internal option for this...
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Good news: time synchronisation for SyncDirs (cm_FileSync) is implemented in TC 7.5 (beta 3). Using context menu date/time and/or attributes can be copied.

TC's internal solution also supports archive contents, files in sub-dirs, etc., so I meanwhile stopped developing my external tool for the moment.


[keywords for search: TimeAdj, CopyDateOnly, CopyKeepDate / CopyKeepTargetDate - I think I'll release what I have, when I find some time]
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Again some good news, I found some time to finish the external tool:
TimeAdjust - change or copy file dates/times
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
Post Reply