i've been working With Ant for a long time now and love it. gets all the work done
My question, as it is said in the subject , regards files size. I've been importing file info for about 2 years now and my database has grown a bit My files size are represented in separate values (i.e. 650+650 MB) and i would like 2 convert them to a value that would say a sum(for upper example 1300 MB). Can that be done via some script, and if so, how?
program CalcSum;
var
i, Total: Integer;
s: string;
begin
i := 1;
Total := 0;
s := GetField(fieldSize);
while i <= Length(s) do
begin
if (StrGet(s, i) >= '0') and (StrGet(s, i) <= '9') then
i := i + 1
else
begin
if i > 1 then
Total := Total + StrToInt(Copy(s, 1, i - 1), 0);
Delete(s, 1, i);
i := 1;
end;
end;
if i > 1 then
begin
Total := Total + StrToInt(Copy(s, 1, i - 1), 0);
SetField(fieldSize, IntToStr(Total));
end;
end.
great, man, thanx... i dont know much about programming so those solutions are always a problem for me )) but, i guess after i format size like that there is no way to turn it back like it was before? i mean, the file sizes are not memorized in any way to leave the vice versa formating possibility?
maybe something like this is possible.... to calculate the sum value an present it in the following format:
Files Size: 1300 (650+650) MB
I guess this is possible, only problem after that would be to maybe choose the format of view when exporting to HTML for example. I guess this is pretty hard or even impossible cause there is no string like that in export builder (somethin like $$filesize_sum or $$filesize_nosum)... im just writting string examples cause im not in front of my own computer so i dont know them exactly.