file pattern matching on files - Protocols

This is a discussion on file pattern matching on files - Protocols ; Maybe I'm missing something obvious, but: I would like to be able to have: get /binary *.foo match both file.foo and file.FOO I was hopeful that "set case off" would take care of this for me, and have looked at ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: file pattern matching on files

  1. file pattern matching on files

    Maybe I'm missing something obvious, but:

    I would like to be able to have: get /binary *.foo match both file.foo and
    file.FOO

    I was hopeful that "set case off" would take care of this for me, and have
    looked at the help get for case-sensitive options, to no avail.

    I know I could do get /binary *.[Ff]* to match, but I don't really want to
    have to mod my scripts to handle case sensitive lookups; would prefer a
    global setting or command line switch to accomplish the task, if possible.

    I use k95 2.1.3 for m$ and 8.0.209 on my *nix machines....

    Suggestions?

    TIA





  2. Re: file pattern matching on files

    On 2006-07-19, wrote:
    : Maybe I'm missing something obvious, but:
    :
    : I would like to be able to have: get /binary *.foo match both file.foo and
    : file.FOO
    :
    : I was hopeful that "set case off" would take care of this for me, and have
    : looked at the help get for case-sensitive options, to no avail.
    :
    : I know I could do get /binary *.[Ff]* to match, but I don't really want to
    : have to mod my scripts to handle case sensitive lookups; would prefer a
    : global setting or command line switch to accomplish the task, if possible.
    :
    : I use k95 2.1.3 for m$ and 8.0.209 on my *nix machines....
    :
    Short answer: sorry, no, you can't do what you want without using wildcards
    that the Kermit server understands. But watch out: if two or more files
    exist on the Unix host whose names differ only by casing of letters, they
    will be the SAME file on Windows. (K95 will create new names for you to
    keep the files from overwriting each other, but they aren't pretty -- this
    is a pitfall of mixing case-sensitive and case-insensitive file systems.)

    - Frank

  3. Re: file pattern matching on files

    "Frank da Cruz" wrote in message
    news:slrnebv5tf.kfh.fdc@panix1.panix.com...
    > On 2006-07-19, wrote:
    > : I would like to be able to have: get /binary *.foo match both file.foo
    > and
    > : file.FOO
    > :
    > Short answer: sorry, no, you can't do what you want without using
    > wildcards
    > that the Kermit server understands.


    Was afraid that was true. I guess I can take a look at the source and see
    how involved adding a switch to get would be that would expand the pattern
    matching on gets with wildcards; i.e.

    kermit> get /binary /case-insensitive *.foo

    Or take a look at writing a macro that would do the functional equivalent.


    > exist on the Unix host whose names differ only by casing of letters, they
    > will be the SAME file on Windows.


    All too well I know that truth (I'm an old NFS guy). However as the files
    in question originate in the windows world, and are transferred to the unix
    server, the only worry I have is missing data because someone capitalizes a
    file....

    > - Frank


    Frank, thanks again for all you have done and continue to do to keep kermit
    a meaningful portion of the net.



  4. Re: file pattern matching on files

    Hmmm. Since I can effectively control both the send operation that puts the
    file on the *.nix server, and
    the get that retrieves it; what about using the \Flower() function as part
    of the send , with the AS-NAME switch....

    Just tested -- that (for me) is an effective workaround.....




  5. Re: file pattern matching on files

    My "final solution"

    I call this macro prior to executing any download utilizing pattern
    matching.
    For more general use, error checking to handle duplicate filenames and
    rename failure should be implemented.

    define RenameLowerCase {
    local files_matching_pattern
    local num_files_matching_pattern
    local \%i
    assign files_matching_pattern *

    remote query kermit \%ffiles(\m(files_matching_pattern))
    assign num_files_matching_pattern \Feval(\v(query) -1) ; ffiles() returns
    a zero based array.
    for \%i 0 \m(num_files_matching_pattern) 1 {
    remote query kermit \%fnextfile(\m(files_matching_pattern))
    remote rename \v(query) \Flower(\v(query))
    }
    }



+ Reply to Thread