Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch    |    Fun with MS-DOS batch files    |    42,547 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 40,738 of 42,547    |
|    Herbert Kleebauer to ehabaziz2001@gmail.com    |
|    Re: unicode in dos box    |
|    27 Aug 13 22:19:28    |
   
   From: klee@unibwm.de   
      
   On 27.08.2013 18:55, ehabaziz2001@gmail.com wrote:   
   > I can use the following code for unkown reasons :   
      
   I'm not sure what you want to do. If you select the proper   
   regional setting, then a "dir" will correctly display   
   the file names. If you don't want to change the regional   
   setting, you have to use a windows program to display   
   the dir output, like:   
      
   cmd /u /c dir >tmp.txt &start /w tmp.txt & del tmp.txt   
      
      
   > cmd /u /c dir /b %folder% > dir.lst   
   >   
   > FOR /F "delims= tokens=*" %%G IN (dir.lst) DO (   
   > echo %%G   
   > @set filename2=%%G   
   > echo %filename2%   
   > )   
      
      
   This can't work, you have to use at least:   
      
   cmd /u /c dir /b %folder% > dir.lst   
      
   FOR /F "delims= tokens=*" %%G IN ('more dir.lst') DO (   
   echo %%G   
   set filename2=%%G   
   call echo %%filename2%%   
   )   
      
   But this also only displays the correct file names if   
   you use the proper regional setting, but then you also   
   can use a simple "dir".   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca