Question

File Properties, change created and modified by date

  • 27 March 2017
  • 3 replies
  • 15 views

Badge +11

I have a directory of PDF files scanned in 1996, I have feature dataset linked by PDF filename the with another attribute field with correct document creation date.

How can change the PDF filename properties of creation data?


3 replies

Userlevel 2
Badge +16

FME does not have a PDF reader. So the contents can not be changed.

But if you need to copy (or move) all files to a different file name you can use:

Read the filenames using the "Directory and File path" reader.

The "File copy" writer to copy or move the files to a different location and/or name.

Badge +11

FME does not have a PDF reader. So the contents can not be changed.

But if you need to copy (or move) all files to a different file name you can use:

Read the filenames using the "Directory and File path" reader.

The "File copy" writer to copy or move the files to a different location and/or name.

Using the File Copy, creates a new file and changes the date/time to current. It's not just PDF but any file (text, dwg, tiff) changing the created/modified date.

 

Badge +11

Workbench

0684Q00000ArLilQAF.png

DateFormatter = 2018-01-01 to destination Epoch date %s

0684Q00000ArLbbQAF.png

Python Caller = os.utime( filename , (convert Epoch date string to int, convert Epoch date string to int)

import fme
import fmeobjects
import os


def FeatureProcessor(feature):
    os.utime(feature.getAttribute('file'), (int(feature.getAttribute('date')),int(feature.getAttribute('date'))))

Reply