Size filter

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.

Size filter

Postby LPrendergast » Wed Jun 24, 2009 10:12 am

I have a set the may be empty (0 bytes) and I am trying to use the size filter to exclude them from FTP. However some files which are small (617 bytes), but technically it is 0KB. The size filter only allows KB, MB and GB. Is there a way around this limitation?
LPrendergast
Verified User
 
Posts: 11
Joined: Tue May 26, 2009 8:54 am

Re: Size filter

Postby Support_Sai » Wed Jun 24, 2009 1:49 pm

The size filter values may optionally be suffixed with KB, MB or GB. A numeric value without any suffix will be treated as number of bytes. So, a value of 1 means 1 byte. If you want to exclude all files with zero bytes, your size filter should be set up with From and To set to zero. Below is a sample project that prints the list of files that are not empty in the local folder D:\temp:

Code: Select all
<project name="Size Filter Test" mainModule="Main" version="1.0">
   <description></description>

   <module name="Main">

      <createFileList fileListVariable="nonEmptyFiles">
         <fileset dir="D:\temp">
            <sizeFilter>
               <exclude from="0" to="0" />
            </sizeFilter>
         </fileset>
      </createFileList>

      <print>
         <![CDATA[${nonEmptyFiles}]]>
      </print>

   </module>

</project>


The same result can be achieved with an inclusion filter too, by setting From size to 1 and leaving the To size blank (no limit). Below is another project to demonstrate this:

Code: Select all
<project name="Size Filter Test" mainModule="Main" version="1.0">
   <description></description>

   <module name="Main">

      <createFileList fileListVariable="nonEmptyFiles">
         <fileset dir="D:\temp">
            <sizeFilter>
               <include from="1" />
            </sizeFilter>
         </fileset>
      </createFileList>

      <print>
         <![CDATA[${nonEmptyFiles}]]>
      </print>

   </module>

</project>
Support_Sai
 


Return to Community Forum

Who is online

Users browsing this forum: No registered users and 2 guests