Skip to content

Set file creation/change time in touch #14900

@andre5x

Description

@andre5x

Description

With the touch function you can set the modification and access time, but not the creation/change time. I have several Windows applications where I need to set the creation time, for example a backup tool that needs to preserve the creation time. I have solved that with a C program that can set creation, modification and access times and that can be invoked from PHP using (Unix) sockets. But that is a relatively complicated solution, it would be much simpler/neater if you could set the creation time using touch.
It would also be nice if the copy function would have a flag to preserve ctime, mtime and a time. In that case a touch to reset ctime, mtime and atime would not be needed at all. But I have a PHP tool that sets ctime and mtime of JPG files based on the ctime and mtime in the Exif header, for that I need the touch solution. A flag in the copy function would be a partial solution, setting ctime with touch is a more general and complete solution.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions