Author Topic: What is the syntax for wildcard in path and file names?  (Read 3780 times)

0 Members and 1 Guest are viewing this topic.

smolls

  • Guest
What is the syntax for wildcard in path and file names?
« on: March 16, 2008, 02:28:50 PM »
I am interested to learn the syntax for path and file names when I want to use a wildcard symbol.

I understand that ? means any single character and that * means any string of characters.  But how do I actually use ? and * ?  I would be grateful if someone could answer the following questions.

Quote
Can I just say  *\*.ini to mean ANY FILE ENDING IN "INI" IN ANY PATH ON ANY DRIVE or do I need to qualify the drive like this  D:\*\*.ini

Quote
Can I use * to mean ANY PATH WITH ANY NUMBER OF FOLDERS ?  For example: if I want to define all files called file001.vko such as C:\Documents and Settings\username\Application Data\EPSON\Smart Panel\file001.vko then can I use *\file001.vks

Quote
If I want to represent this C:\Documents and Settings\username\Application Data\EPSON\Smart Panel\*.* then can I use *\Smart panel\*

Quote
If I want to refer to any filename with any extension then do I use just * or do I need to use *.*
 
Quote
Maybe the last question should ask about should be \* or *.*. Is this question's syntax correct and the last question's syntax incorrect?

Thank you for any help!  :)

Regards,
Smolls.

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Re: What is the syntax for wildcard in path and file names?
« Reply #1 on: March 16, 2008, 02:34:34 PM »
Any ini file: *.ini
* could be used for any number of folders.
You can use before or after, I mean, *\Smart panel\* is ok.
any file with extension: *.*
any file extensionless included: *
The best things in life are free.

psw

  • Guest
Re: What is the syntax for wildcard in path and file names?
« Reply #2 on: March 16, 2008, 07:36:57 PM »
* could be used for any number of folders.
You can use before or after, I mean, *\Smart panel\* is ok.

I think that is it wrong. At least command running from the root of my system drive
dir *\system32\*
gives error
The filename, directory name, or volume label syntax is incorrect.


Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Re: What is the syntax for wildcard in path and file names?
« Reply #3 on: March 16, 2008, 10:36:09 PM »
I think that is it wrong. At least command running from the root of my system drive
dir *\system32\*
gives error
The filename, directory name, or volume label syntax is incorrect.
dir syntax has nothing to do with the avast exclusion list.
avast uses a text string to exclude paths: * means any number of characters.
The best things in life are free.