Need help finding the owner of a file.
Hey y'all!
I'm attempting to create a script to help return all of the file names of PDFs created by a user on a specific date. I'm running into some issues finding a way to return the owner's name. I couldn't find any related posts or any documentation online so I'm starting to think that this might not be possible. Let me know if you need any more information to take a crack at this!
Here is what I have:
*I left the folder line open so you can adjust it to use your own*
var folder = new Folder("C:\\Users\\Kernzy\\Downloads\\DailyTester"); // replace with the path to your folder
var files = folder.getFiles();
for (var i = 0; i < files.length; i++) {
var file = files[i];
if (file instanceof File) {
var owner = file.owner;
var created = file.created;
alert("File: " + file.name + "\nOwner: " + owner + "\nCreated: " + created);
}
}
Current Alert:
File: Tile.pdf
Owner: undefined
Created: Tue Mar 28 2023 10:13:19 GMT-0500
Goal Alert:
File: Tile.pdf
Owner: Kernzy
Created: Tue Mar 28 2023 10:13:19 GMT-0500
