get details like date/time modified from a file

  • Автор темы Автор темы zenewbie
  • Дата начала Дата начала

zenewbie

Client
Регистрация
25.12.2013
Сообщения
216
Реакции
18
Баллы
18
Is there a way to read the details from a file, for example when "xyz.jpg" was last modified?
 
You can do it with this C# snippet:
C#:
Развернуть Свернуть Копировать
var fileInfo = new FileInfo(project.Variables["filepath"].Value);
return fileInfo.LastWriteTime;

There should be a "filepath" variable in your project where full path to a file is stored.
 
  • Спасибо
Реакции: GLADO
Thanks a lot!
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)