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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -