Loading ...
Sorry, an error occurred while loading the content.

^$GetFiles([+]FilePath;FileSpecs[;Attr][;SortingOrder])$

Expand Messages
  • nullclip
    I get undesired behavior from the Attr and SortingOrder parameter of the subject clip function. For example, I desire to get files that have only the A
    Message 1 of 5 , Mar 25, 2014
    • 0 Attachment
      I get undesired behavior from the Attr and SortingOrder parameter of the subject clip function.
      • For example, I desire to get files that have only the 'A' attribute set.  However, when I specify the 'A' attribute, I get files with 'A' and any combination of 'R' 'H' and/or 'S' attributes.  I need some means of excluding files with unspecified attributes from the get file function.
      • For example, I desire to sort files by say, size.  However, when I get files with the + parameter set (include subfolders), the files are sorted by size within only their immediate folder; so it seems.  The files are not sorted by size overall.
      While I am ranting, I suggest two other capabilities that I believe would help clippers like me.
      1. Implement a means to easily set a break or pause point in clips to help in the debugging process.
      2. When the code pauses at the specified line, allow the programmer to hover a cursor over any variable, and display a pop-up notification with the variable's current value.
    • Axel Berger
      ... Your first two points are how it s implemented and there doesn t seem to be anything to do about it except post processing. The other is already there. You
      Message 2 of 5 , Mar 25, 2014
      • 0 Attachment
        nullclip@... wrote:
        > 1. Implement a means to easily set a break or pause point in clips to
        > help in the debugging process.
        > 2. When the code pauses at the specified line, allow the programmer to
        > hover a cursor over any variable, and display a pop-up notification
        > with the variable's current value.

        Your first two points are how it's implemented and there doesn't seem to be
        anything to do about it except post processing.

        The other is already there. You have ^!Continue and you can show any
        variable contents in its text. You may want it to be more comfortable, but
        it's there.

        Axel
      • flo.gehrke
        ... Try the following clip. It s just a basic concept but, so far, it works fine for me. It s designed for file sizes from 0 through 999.999.999.999 bytes.
        Message 3 of 5 , Mar 28, 2014
        • 0 Attachment
          ---In ntb-clips@yahoogroups.com, <nullclip@...> wrote :

          > I desire to sort files by say, size.  However, when I get files
          > with the + parameter set (include subfolders), the files are
          > sorted by size within only their immediate folder; so it seems.
          > The files are not sorted by size overall.

          Try the following clip. It's just a basic concept but, so far, it works fine for me. It's designed for file sizes from 0 through 999.999.999.999 bytes.

          Please report any malfunctions!

          Regards,
          Flo


          The clip:


          ^!SetHintInfo Working...
          ^!SetScreenUpdate Off
          ;  For example: Searching 'E:\Notetab\' and subdirectories for TXT files
          ^!Set %File%=^$GetFileFirst("+E:\Notetab\";"*.txt")$

          :Loop
          ^!Append %All%=^$GetFileSize(^%File%)$…^$GetExpandedName(^%File%)$^%NL%
          ^!Set %File%=^$GetFileNext$
          ^!IfEmpty ^%File% Out
          ^!Goto Loop

          :Out
          ^!CloseFileFind
          ^!InsertText ^%All%
          ^!Replace "^" >> "^$StrFill(^%Space%;12)$" WARS
          ^!Replace "^[\x20\d]+(?<=(.{12}))" >> "$1" WARS
          ^!Replace "^(.{3})(.{3})(.{3})(.{3})" >> "$1.$2.$3.$4" WARS
          ^!Toolbar Sort Ascending
          ^!Jump ^$GetTextLineCount$
          ^!Find "^[\x20.]+\K[\d.]+" RS
          ^!Set %Size%=^$GetSelSize$
          ^!Replace "^[^…]+(?=…)(?<=(.{^%Size%}))" >> "$1" WARS
          ^!Replace "^[\x20]+\K\." >> "\x20" WARS
          ^!IfError Skip
          ^!Goto Skip_-2
          ^!Replace "…" >> "^%Space%" WAST
          ^!Jump Doc_Start
          ^!ClearVariables
        • nullclip
          Works perfect. Thanks Flo. I had hoped that my original post would be read by the authors of Note Tab Pro, and that they might update the applicable clip
          Message 4 of 5 , Apr 12, 2014
          • 0 Attachment
            Works perfect.  Thanks Flo.

            I had hoped that my original post would be read by the authors of Note Tab Pro, and that they might update the applicable clip commands to improve the language.  Otherwise, we must write extensive clips to get these simple tasks done.
          • Axel Berger
            ... That way lies bloat. To my mind the greatest strength is the ease with which I can write clips that do exactly what I need and to call those clips like
            Message 5 of 5 , Apr 12, 2014
            • 0 Attachment
              nullclip@... wrote:
              > they might update the applicable clip commands to improve the language.

              That way lies bloat. To my mind the greatest strength is the ease with
              which I can write clips that do exactly what I need and to call those clips
              like subroutines where applicable. At first it seems like more work than
              huge do-it-all suites, but once done, it fits you like an old felt slipper.

              Axel


              --
              /¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 2174/ 7439 07
              \ / HTML | Johann-Häck-Str. 14 Fax: +49/ 2174/ 7439 68
              X in | D-51519 Odenthal-Heide eMail: Axel-Berger@...
              / \ Mail | Deutschland (Germany) http://berger-odenthal.de
            Your message has been successfully submitted and would be delivered to recipients shortly.