How can I copy file attribute from 1 file to another

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
xpt00967@ckoie.com
Junior Member
Junior Member
Posts: 3
Joined: 2018-02-16, 07:45 UTC

How can I copy file attribute from 1 file to another

Post by *xpt00967@ckoie.com »

I have 1 file with attribute(like create time,modify time and all of that) that I want to copy to another file.
how can I do it?
and can I get the list of all attribute that the OS know about file?
thanks
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

You've posted in "Plugins and addons: devel.+support" forum.

Are you going to write a plugin?





 
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

have 1 file with attribute(like create time,modify time and all of that) that I want to copy to another file.
how can I do it?
1. Mark (select) the file that you want to change the attributes for.
2. Put the cursor on the file you want to copy the attributes from (but don't mark it).
3. Choose "Files" -> "Change Attributes..." from the menu or run the command cm_SetAttrib from command line.
4. Click th button "Load from file under cursor"
5. Click OK.
and can I get the list of all attribute that the OS know about file?
You can use either these commands:

cm_CopyFileDetailsToClip
cm_CopyFpFileDetailsToClip
cm_CopyNetFileDetailsToCli

cm_SaveDetailsToFile
cm_SaveDetailsToFileA
cm_SaveDetailsToFileW

to copy the file name (with or without path) to either the clipboard or directly to a file - including the size, date, time and attributes.

If you are using Custom columns, then all the columns will be copied.

In my signature you will find a link to alternative TC menus, where all these commands are incorporated in the menu (under Files -> Copy Names)

-----

This Topic should be moved to Total Commander (English)
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

[mod]Moved to the English forum.

Hacker (Moderator)[/mod]
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Perhaps ShellDetails would be of use. There is a lot of file metadata that can be accessed using plugins (EXIF, MP3 tags, etc.).

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

ShellDetails
I cannot think of a way to copy shelldetails data for one file to another only using TC and plugins. I think that requires a thirdparty tool.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
xpt00967@ckoie.com
Junior Member
Junior Member
Posts: 3
Joined: 2018-02-16, 07:45 UTC

Post by *xpt00967@ckoie.com »

petermad wrote:
have 1 file with attribute(like create time,modify time and all of that) that I want to copy to another file.
how can I do it?
1. Mark (select) the file that you want to change the attributes for.
2. Put the cursor on the file you want to copy the attributes from (but don't mark it).
3. Choose "Files" -> "Change Attributes..." from the menu or run the command cm_SetAttrib from command line.
4. Click th button "Load from file under cursor"
5. Click OK.
]
Can you please tell me witch attributes are copy with "Change Attributes..." ?
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Can you please tell me witch attributes are copy with "Change Attributes..."
Archive
Read only
Hidden
System
Date
Time
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

petermad,
I cannot think of a way to copy shelldetails data for one file to another only using TC and plugins. I think that requires a thirdparty tool.
Well, no one said it should be done using TC only. The topic even was in the Plugins and Addons forum originally.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
xpt00967@ckoie.com
Junior Member
Junior Member
Posts: 3
Joined: 2018-02-16, 07:45 UTC

Post by *xpt00967@ckoie.com »

petermad wrote:
Can you please tell me witch attributes are copy with "Change Attributes..."
Archive
Read only
Hidden
System
Date
Time
where can i see more details what is exaclty copy on "System" and "Archive"
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

where can i see more details what is exaclty copy on "System" and "Archive"
It is just copied whether the System and/or the Archive attribute is set or not for the file. These are basic file-system attributes ( https://en.wikipedia.org/wiki/File_attribute )
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Phred
Senior Member
Senior Member
Posts: 375
Joined: 2009-06-16, 15:24 UTC
Location: SEAu

'Dab'

Post by *Phred »

This question strikes me as important and valuable.

I don't know how many years I've had to resign myself to the limitations TC's compare functions. Useful though they are in some places, there are many times when I want to compare files between list-panels, only to be told that there are differences - that are definitely not apparent.
I surmise that some files might differ in, maybe, writetime, by only milliseconds (whatever the granularity is).

The Format Painter in Word of many generations ago received loud applause during its first presentations. It would be so welcome to have a function in TC that made allegedly differing files the same - in terms of attributes. Commands, Synchronise Dirs... and [Shift-F2] Mark, Compare Directories... (folders) would yield no results - after 'Attribute Painting'.

Wick up a file's (some files'..) attributes and 'dab' them onto another. Bliss.

Any chance?
..third-party tools or otherwise.

(I see petermad's suggestions of reading and saving attributes externally, but, yes, we need to go further.)
Regards, PhredE
Licence holder since 1999
Awaiting a $D donors-token for the title-bar so we can display that we have donated further.
Post Reply