labaiss Posted August 2, 2010 Report Posted August 2, 2010 Labdien, Kādam ir kāds gatavs php scripts aizķēries directory apjoma (Mb, Gb......) noteikšanai, kurā atrodas visāda formāta faili..... nepieciešams tikai lai izvada skaitli - piem. 12 Mb Paldies. Quote
briedis Posted August 2, 2010 Report Posted August 2, 2010 Hmm, man ir! http://tinyurl.com/245w92k Quote
sandis_m Posted August 2, 2010 Report Posted August 2, 2010 Hmm, man ir! http://tinyurl.com/245w92k :D ++ Quote
labaiss Posted August 2, 2010 Author Report Posted August 2, 2010 Hmm, man ir! http://tinyurl.com/245w92k Pāldies! Quote
rATRIJS Posted August 2, 2010 Report Posted August 2, 2010 Reku pats iisaakais skirpts ^_^ $directory = '/home/ratrijs/'; echo exec("du -mh $directory"); Quote
Леший Posted August 2, 2010 Report Posted August 2, 2010 rATRIJS n00b, var vēl īsāk: die(exec("du -mh /home/ratrijs/")); Quote
bubu Posted August 2, 2010 Report Posted August 2, 2010 Un ja man Windows? Kas man du portēt vajag? Quote
Леший Posted August 2, 2010 Report Posted August 2, 2010 (edited) taisi bat failu getsize.bat: @echo off setlocal enabledelayedexpansion set dir=%1 set size=0 for /R %dir% %%F in (*) do ( set /a size=!size!+%%~zF ) echo %size% endlocal tad die(exec("getsize.bat C:\DOCUME~1\ratrijs")); EDIT: Atvainojos, pieliec vēl @echo off bat faila sākumā. EDIT2: Jā, un rādīs viņš aktuālo izmēru, nevis size on disk. Edited August 2, 2010 by Леший Quote
rATRIJS Posted August 2, 2010 Report Posted August 2, 2010 damn :( bet...BET - maneejaa ir nodaliits direktorijas variablis! Kas ir mega pluss - gandriiz vai MVC ^_^ Quote
Леший Posted August 2, 2010 Report Posted August 2, 2010 Ok, MVC: die(exec("du -mh ".($dirname="/home/ratrijs/"))); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.