Cannot pass asterisk character to external command via powershell -


i cannot pass asterisk character external command using powershell

i use following line like

& .\args.bat @("-arg1", "-arg2", "*.test.com") 

where args.bat dumps passed arguments

@echo off echo %~nx0 script args are... %%i in (%*) echo %%i 

and instead of passing "*.test.com" lookups current directory files matching pattern "*.test.com" , sends list of them args.bat

that can seen if use "*" instead of "*.test.com"

i've tried tick character escape asterisk, didn't help

in case using asterisk required i'm passing makecert.exe create wildcard domain certificate

please help

i'm not seeing that. test created args.bat so:

'pause' > args.bat 

then executed it:

& .\args.bat @("-arg1", "-arg2", "*.ps1") 

when in task manager @ command line cmd.exe, see:

enter image description here

it must batch file doing because powershell doing nothing *. btw used *.ps1 because directory executed had ton of ps1 files in it.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -