Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
DOS batch FOR with () files
I am a computer dilettante burdened with VISTA64; please be gentle:
For /F "tokens=*" %%a IN ('"dir /-c "%filename%" | find "bytes" | find /v "free""') do @Set
This line sets up a summary that is further used to identify the file name. It works fine until it encounters a file name containing "()" which it will not recognize and responds with the disappointing statement, ".....was unexpected at this time," which is on a par with "Not tonight, hon." At the command prompt the DIR command does return the data for files containing brackets, but not in this command in the batch file. Any help or insight would be appreciated.