Jump to content

Dosya Boyutu Bulmak


xarax

Recommended Posts

AMS de bir dosyanın boyutunun sayısal değerini görmek için bir kod var fakat klasör için aynı şey geçerlimi programın içindeki kodların hepsine baktım ama bulamadım bunu nasıl yapabiliriz herhangi bir klasörün boyutunu nasıl alabiliriz?

Link to comment
Share on other sites

Programın yardım dosyasında mevcut(File.Find)

g_FolderSize = 0;

-- This function determines the size of a file and adds it to the total.
-- This function is used as the callback function for the File.Find action in this example.
function OnFileFound(Path)
    local nSize = File.GetSize(Path);
    g_FolderSize = g_FolderSize + nSize;
    return true;
end

-- Allow the user to browse for a folder whose size they want.
local strFolder = Dialog.FolderBrowse("Find a folder",Shell.GetFolder(SHF_MYDOCUMENTS));

StatusDlg.Show();
tblFiles = File.Find(strFolder,"*.*",true,false,nil,OnFileFound);
StatusDlg.Hide();
Dialog.Message("Size",String.GetFormattedSize(g_FolderSize));[/CODE]

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...