I am trying to find the metadata (specifically the creation date) for a .txt file. (Well, a folder of them, but one at a time in each iteration of the loop).
The folder is located on a server, so has a location address (C: etc) not a web address or Sharepoint etc.
To do this, I have done the following steps:
1. Get files in folder - Var: Files
For Each Current Item in Files
2. Get File Path Part - Var: Directory, FileName, FileNameNoExtension
3. Run Python Script - Var: PythonScriptOutput
import sys
sys.path.append(r"c:\Python27\Lib")
import os
import datetime
from datetime import date
filename = """%CurrentItem%"""
createdDate = os.path.getctime(filename)
createdDateFormat = date.fromtimestamp(createdDate)
print(createdDateFormat)
End
I cannot for the life of me work out why the Python is not working. The other variables get filled, but not the PythonScriptOutput.