简体   繁体   中英

windows does not properly handle * (asterisk) argument when passed to python script

I have a python script handling conversion of FIX (xml/json type) data. However under windows the argument * does not work to select all files for processing. However it does work under bash windows. Any way to circumvent/address this behavior?

As it seems windows cannot handle wildcards on it's own for file expansion. The individual binaries like copy, move etc handle on their own. The solution here is to add a loop to pass on each filename to the script:

FOR %%i IN (*.log) DO convert_FIX.py %%i

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM