| 
 | 
| Название | FileAge | 
| Имя файла (*.txt) | FileAge.txt | 
| Описание | Определяет "возраст" файлов | 
| Автор | Вахмурка | 
| Параметры | ("%L") | 
| Вызываемые плагины | file, date, int64 | 
| Иконка | 
 | 
    
| Версия | 2.0 | 
| Дата обновления | 28.08.2008 | 
local fh = file.open(arg(1), "r")
local Str, i, Modif, Result, Mess, Unit, Num
local Secs = "31557600 2592000 86400 3600 60"
local Titles = "year month day hour minute"
local Now = date.now
if(fh > 0) do
	for(not(file.eof(fh))) 
		Str = file.readstring(fh)
		if(Str) do
			Mess = Mess ++ Str ++ ": " ++ esc(?+\t+, ?+\+)
			Modif = file.lastmodified(Str)
			Result = date.subseconds(Now, Modif)
			for(i = 1; i <= 5; i++)
				Num = word(Secs, i)
				Unit = int64.divide(Result, Num)
				if(Unit) do
					Mess = Mess ++ Unit ++ " " ++ word(Titles, i) ++ "s, "
					Result = int64.mod(Result, Unit*Num)
				else
					Result = int64.mod(Result, Num)
				endif
			endfor
			Mess = Mess ++ Result ++ " seconds" ++ esc(?+\n+, ?+\+)
		endif
	endfor
else
	messagebox("ok error", "File not opened", "FILE plugin error")
	quit
endif
file.close(fh)
messagebox("ok information", Mess, "FileAge Script")
Выделите файлы (или установите курсор на один файл) и запустите скрипт. Диалоговое окно будет содержать сведения о "возрасте":
 
 | 
На главную | 
 
 | 
Все о Total Commander | 
 
 | 
PowerPro | 
 
 | 
PowerPro & Total Commander |