Questions tagged [wildcards]

Wildcards in computer programming are symbols that can stand for any number of different points of data. Using wildcards in a query will return more results that standard parameters.

234 questions
72
votes
2 answers

Does %* in batch file mean all command line arguments?

Does %* in batch file mean all command line arguments?
Matt
  • 6,231
  • 20
  • 57
  • 79
50
votes
8 answers

Is there any way to get the windows cmd shell to expand wildcard paths?

Occasionally, the cmd shell's inability to expand wildcard paths can really be an inconvenience. I had to pass 100 files in a directory to a program, and couldn't type *.ext. Instead, I used mingw's 'ls' to dump the list to a file, then replaced…
cemulate
  • 1,121
  • 4
  • 17
  • 21
25
votes
1 answer

DEL *1.* deletes all files in folder

I'm trying to delete all files that end with the number one, but for some reason it is deleting all of the files in the folder. The command I'm using is DEL *1.* It works when I use a letter like DEL *e.* but when I use a number everything is…
Alex
  • 323
  • 3
  • 7
24
votes
4 answers

Is it possible to print out the shell expansion?

I know there is a specific set of rules that shell expand the commands user typed. (let's talk about bash shell.) Is it possible to print out a command in the form after shell expansion? It seems to be a good utility to learn and make sure how shell…
Weishi Z
  • 343
  • 2
  • 7
24
votes
5 answers

Using wildcard search/replace in Notepad++

Here's my problem: In a .txt file, I need to find and replace thousands of instances of syntax like this: (see (a053007djfgspwdf)) or (see (a053007djfgspwdf) and (a54134xsedgeg)) or (see (a053007djfgspwdf), (a9554xsdfgsdfg) and…
Michael Tuck
  • 241
  • 1
  • 2
  • 3
20
votes
1 answer

Exclude directories from Windows Search by wildcard

Search Indexing is interfering with our build process, and I would like to exclude all instances of our dev directories from the indexer (we have a trunk and branches setup). I could exclude the whole parent directory, but that would exclude too…
mskfisher
  • 1,053
  • 3
  • 12
  • 22
17
votes
3 answers

How to search Outlook Exchange Global Address List with Wildcards?

Our exchange GAL contains many group addresses, and it's hard to find a certain group contains for example "ABC". In the Contacts tab in outlook there is no option to search for a name that contains "ABC", neither from Active Directory itself (Run:…
Noam Manos
  • 1,804
  • 1
  • 20
  • 20
17
votes
8 answers

Trouble trying to use Windows Search to search for file with a question mark in the content

It seems that Windows Search is having trouble when I specify a question mark character as the content that I'm searching for within my files. I've…
jpierson
  • 307
  • 1
  • 4
  • 13
16
votes
4 answers

PowerShell: How do I append a prefix to all files in a directory?

Currently I'm using cmdlets like: dir | rename-item -NewName {$_.name -replace "-","_"} But now I need to add a prefix to the filename for all files in the directory. I can't predict how long each filename is (it varies), so I can't just use a…
Giffyguy
  • 1,022
  • 10
  • 22
  • 38
14
votes
2 answers

Launch a shortcut using batch file

Here's the problem. I have a shortcut on roughly 260 computers located in the same folder as below; "c:\documents and settings\all users\desktop\Remote agent 1234.lnk" The only thing that changes on the shortcut is the number. Is there a way to use…
ghost3h
  • 318
  • 1
  • 2
  • 9
13
votes
3 answers

Search for a file with wildcards in the path using Windows command line

How can I search for files in the Windows command line, using wildcards like this? C:\Users\*\AppData\Local\*.txt
Saw
  • 265
  • 1
  • 2
  • 10
13
votes
6 answers

Using a wildcard in a condition to match the beginning of a string

Trying to have a variable meet a string of text that varies by length. The part of the string that matters is the first couple of characters. var1=hello if [ $var1 == hello ]; then echo success fi Or var1=hello if [ $var1 == h*o ];…
EAG08
  • 131
  • 1
  • 1
  • 3
12
votes
5 answers

Wildcards in Word

I know little of wildcard usage in word. wildcards - case sensitive TO FIND enter mark ^13 tab ^t any lowercase letter [a-z] any uppercase letter [A-Z] any letter …
Alexandar
12
votes
2 answers

How to use wildcards in a xargs-command?

I've got a directory with numbered files, e.g. 1_foo.txt 2_bar.asc 13_test.png, and want to move them into individual directories (e.g. 1, 2 and 13) using as simple a bash command as possible. Creating the numbered directories was easy: mkdir $(seq…
n.st
  • 1,908
  • 1
  • 17
  • 30
11
votes
1 answer

`locate` wildcard strange behavior - why?

locate "*.png" returns all files ending with .png, as expected. locate "test.*" doesn't return anything, but there are files named test in my system. locate "*test" returns all files ending with test, as expected. locate "test*" doesn't return…
Vittorio Romeo
  • 473
  • 2
  • 8
  • 22
1
2 3
15 16