Skip to main content

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?

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.


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.

 


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