windows - Force passing long file names to dos for command -
i have problem following simple dos command:
for %%f in (.\07_procedures\datasources\*.sql) echo "%%f"
it action every file sql
extension. works fine, except long names. when directory contains files, sql_
extensions, picked too. behavior depend on whether 8.3 files turned on or off on file system. if turned on (default choice on computers) sql_
passed, because extension cropped.
how force for
fetch long file names ? !
p.s. not offer powershell upgrade.
you can try examine extension in loop itself
for %%f in (*.sql) ( if /i "%%~xf" equ ".sql" echo %%f )
Comments
Post a Comment