12.4. Updating the Modification Time of a File: The `Touch` Factory
Prev | Chapter 12. Platform-Independent File System Manipulation | Next

## 12.4. Updating the Modification Time of a File: The `Touch` Factory

If you just need to update the recorded modification time for a file, use the `Touch` factory:

    Command(
        "file.out",
        "file.in",
        action=[
            Copy("$TARGET", "$SOURCE"),
            Touch("$TARGET"),
        ]
    )

Which executes as:

    % scons -Q
    Copy("file.out", "file.in")
    Touch("file.out")

Prev | Up | Next
12.3. Moving (Renaming) Files or Directories: The `Move` Factory | Home | 12.5. Creating a Directory: The `Mkdir` Factory