file sizes

Discuss RoboTask here
Post Reply
sen5243
Posts: 9
Joined: Sun Sep 17, 2006 6:43 am

file sizes

Post by sen5243 »

Hi Oleg
 
I’ve got a question.
I have three folders, they are called 01,02 and 03.
All three folders contain the same file called: test.xml.
But their file sizes are different.
Now I need the middle sized file, in one of these folders.
And then move the file to a different location.
Is it possible to help me?
 
Thanks Richard
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

file sizes

Post by Oleg »

There is {FileSize()} system variable
You may use it:
{FileSize(c:\01\test.xml)}
{FileSize(c:\02\test.xml)}
{FileSize(c:\03\test.xml)}

In order to determine the miidle size use the following algorithm:
Suppose we have 3 values: size1, size2, and size3

Code: Select all

if size1 > size2 then
   if size1 < size3 then
      middle = size1
   else
      if size2 > size3 then 
         middle = size2
      else
         middle = size3
      end if
   end if
else
   if size1 > size3 then
      middle = size1
   else
      if size2 < size3 then 
         middle = size2
      else
         middle = size3
      end if
   end if
end if
sen5243
Posts: 9
Joined: Sun Sep 17, 2006 6:43 am

file sizes

Post by sen5243 »

Hi oleg
 
It is working flawless !!
Thanks a lot
 
richard
Post Reply