Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2005
    Posts
    50

    Search file by size and name

    is it possible to searh a file by the name and the size?
    if he found the name and the size not match, he continue searching until he find the same name and the same size.

  2. #2
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    File.Find has a callback function (FileFoundCallbackFunction) you can use to test the size of the file and then tell the action whether or not to continue.

    Code:
    function CheckFileSize(FoundPath)
    	if File.GetSize(FoundPath) == 123456 then
    		return false
    	else
    		return true
    	end
    end
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  3. #3
    Join Date
    Jul 2005
    Posts
    50
    Can you give me a small example? i'm little difficult in this.

  4. #4
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Use the File.Find action and the help file. I provided a small excerpt of the code above that could potentially be used to find a file based on the file size. Play with the code, give it a shot, if it doesn't work, post what you tried here and we can help figure out why it may not have worked.

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts