راهنمایی برای بدست آوردن حجم فایل(megabyte)

pclord

کاربر متخصص
سلام
دوستان کسی پلاگینی یا روشی بلده که بشه حجم فایل رو به مگابایت به دست اورد.
پیشاپیش از همه دوستان تشکر میکنم.
 

splinter cell

Well-Known Member
برای اینکار از Miscy پلاگین استفاده کنید.
کد:
[SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101]set$=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]'<SrcDir>\test.txt'
[/COLOR][/SIZE][/COLOR][/SIZE][B][SIZE=2][COLOR=#000080][SIZE=2][COLOR=#000080] 
PluginSet[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101]("PlugIn","set$")
[/COLOR][/SIZE][/COLOR][/SIZE][B][SIZE=2][COLOR=#000080][SIZE=2][COLOR=#000080] 
PluginRun[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101]("PlugIn","GetFileSizeX")
[/COLOR][/SIZE][/COLOR][/SIZE][B][SIZE=2][COLOR=#000080][SIZE=2][COLOR=#000080] 
PluginGet[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101]("PlugIn","get$")
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000] 
** for kiloobite can /1024
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101] 
get=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]VAL[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101](get$)[/COLOR][/SIZE][/COLOR][/SIZE]

 

pclord

کاربر متخصص
فایده ای نداشت ،وقتی میخوام حجمو در یه Text لود کنم مثلا 3.37 MB رو به این شکل نشون میده 3538432


کد:
set$='c:\documents and settings\pc lord\desktop\restorator.rar'
PluginSet("PlugIn","set$")
PluginRun("PlugIn","GetFileSizeX")
PluginGet("PlugIn","get$")
** for kiloobite can /1024
get=VAL(get$)
LoadText("Text","get$")
 

splinter cell

Well-Known Member
عزیز دل!
هر مگابایت =1024 کیلوبایت
kb/1024=mb
خیلی ساده است شما همون عدد حاصل رو بر 1024 تقسیم بفرمایید تا مگابایت رو داشته باشید.
 

pclord

کاربر متخصص
ببخشید من میخوام مثلا اگه حجم یه فایلی پنج و نیم مگابایت بود به این شکل نشونش بده mb 5.5
 

splinter cell

Well-Known Member

کد:
[SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101] 
set$=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]'<SrcDir>\test.txt'
[/COLOR][/SIZE][/COLOR][/SIZE][B][SIZE=2][COLOR=#000080][SIZE=2][COLOR=#000080] 
PluginSet[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101]("PlugIn","set$")
[/COLOR][/SIZE][/COLOR][/SIZE][B][SIZE=2][COLOR=#000080][SIZE=2][COLOR=#000080] 
PluginRun[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101]("PlugIn","GetFileSizeX")
[/COLOR][/SIZE][/COLOR][/SIZE][B][SIZE=2][COLOR=#000080][SIZE=2][COLOR=#000080] 
PluginGet[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101]("PlugIn","get$")
KB=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]VAL[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101](get$)/[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]1024
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101] 
MB=KB/[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]1024
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101] 
MB$=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]CHAR[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101](MB)
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000] 
***********
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101] 
float$=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]'.'
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101] 
posFloat=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]POS[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101](float$,MB$)
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000] 
**Number Of Float(you can change That)
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101] 
posFloat=posFloat+[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]2
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101] 
copy$=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]StrCopy[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101](MB$,[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101],posFloat)
[/COLOR][/SIZE][/COLOR][/SIZE][B][SIZE=2][COLOR=#000080][SIZE=2][COLOR=#000080] 
DisplayValue[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#010101][SIZE=2][COLOR=#010101]("Text","copy$")[/COLOR][/SIZE][/COLOR][/SIZE]

 

جدیدترین ارسال ها

بالا