Menu

Possible to disable wildcards?

Help
2014-06-06
2014-06-07
  • ZiNgA BuRgA

    ZiNgA BuRgA - 2014-06-06

    It seems that p7zip will try to expand wildcards in specified filenames in both the -i and -x switches, as well as list files.

    For example, if I have a file named 'a*.txt' and I wish to add it to an archive, such as:

    7z a -t7z a.7z 'a*.txt'

    It'll end up adding every .txt file starting with 'a'.

    Is there anyway to either specify a filename with a special character (without it auto expanding) or perhaps disable this wildcard expansion feature?


    Maybe a nice feature would perhaps be the ability to specify a list of files that is null separated.

     
  • Igor Pavlov

    Igor Pavlov - 2014-06-06

    Peobably now there is no way to disable it.
    If you add only one file you can use stdin (-si switch)

    Is it common practice to use "*" in filename in your OS?
    What is your OS?

     
  • ZiNgA BuRgA

    ZiNgA BuRgA - 2014-06-06

    Oh okay, thanks for the reply!
    This is on a Linux machine.

    I wouldn't say it's common practice, but when accepting arbitrary input from users, it's a case that I need to consider.

     

    Last edit: ZiNgA BuRgA 2014-06-06
  • Igor Pavlov

    Igor Pavlov - 2014-06-06

    I'll add new -swd switch to disable that wildcard matching.

    "list of files that is null separated" - probably I'll think about it in future.

     
  • ZiNgA BuRgA

    ZiNgA BuRgA - 2014-06-07

    Oh wow, thanks a lot for that - that would be wonderful! :)

    The idea of the null separated list file was to get around the issue of filenames containing newline characters. I suppose I'm being rather pedantic though...
    One can always just pass these types of filenames directly though, so there's a workaround anyway.

     

    Last edit: ZiNgA BuRgA 2014-06-07

Log in to post a comment.