Hi! I have a question, I want to make zbrush script that would be taking a path to a folder and checking all files that inside this folder and getting last updated file (it may be updated not inside zbrush). I saw “FileNameGetLastUsed” function, but it returns only filename that was last used in Zbrush, not in the system, so my question is in there any way to get name of the file that was last used in the system?
Hi,
There’s no command to read the files last modified attribute directly from Zbrush. You need to call an executable or a dll to retrieve that information.
1 Like
Understood, thanks! Can you give me please an example of executing dll from Zscript, dll would be returning path (string) as result into Zscript variable
If you know your way around C++ it should be easy.
This template works fine on Visual Studio :
A dll version is more elegant. But you can also call a simple executable or a script (c#, python, java, auto it…) from your Zscript that will parse the folder and retrieve the name of the most recent file, and save it as a text file that will be read by the Zscript.