Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calculate file size
#3
thats pretty cool.
i just tried that on my mp3 folder.

Macro
Code:
Copy      Help
str _file="C:\Windows\ntbtlog.txt"
_file="D:\mp3"
long fz = GetFileOrFolderSize(_file)
;out fz

;out
;long file_size=700*1024*1024+10
long file_size=fz
long part_size=100*1024*1024

;-------------------
;
int n=file_size/part_size
long last_part_size=file_size%part_size; if(last_part_size) n+1; else last_part_size=part_size
int i
str s
for i 0 n
,s.format("%s.part%i.rar" _file.getfilename i+1)
,out "%s, offset=%I64i, size=%I64i" s i*part_size iif(i<n-1 part_size last_part_size)
pi


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)