Oleg_II Posted October 22, 2005 Share Posted October 22, 2005 (edited) Anybody knows how to convert a text file with UTF-16 LE codepage to 65001 (UTF-8) codepage with a batch command?It can be done with a text editors but I need to do it with CMD or BAT file Oh, yea, it seems to be OT but I need it for some removal work on the SOURCESS folder Edited October 22, 2005 by Oleg_II Link to comment Share on other sites More sharing options...
tommyp Posted October 22, 2005 Share Posted October 22, 2005 try this:copy SOURCESS\I386\FILENAME1.111/A SOURCESS\I386\FILENAME2.111/B Link to comment Share on other sites More sharing options...
Oleg_II Posted October 22, 2005 Author Share Posted October 22, 2005 Thanx! I found this one but unfortunatelly it doesn't help - the codingpage of the new file is still UTF-16 LE Link to comment Share on other sites More sharing options...
Oleg_II Posted October 22, 2005 Author Share Posted October 22, 2005 Well, it seems not to be possible The only choice I have is to convert in other codepage with the command like this:chcp 1251type c:\file1.aaa > c:\file2.aaa Link to comment Share on other sites More sharing options...
lupo Posted October 27, 2005 Share Posted October 27, 2005 (edited) I know this is not a solution; however you can try this:echo >empty.txtfc /LB700000 yourfile.txt empty.txt >newfile.txtResult file should be in ANSI but like this:Thisismynewfileetc..You can try /u (unicode) option in fc command (this will use a different codepage; simply specify it with chcp ) Edited October 27, 2005 by lupo Link to comment Share on other sites More sharing options...
Oleg_II Posted October 27, 2005 Author Share Posted October 27, 2005 lupo Thank you very much! Unfortunately it didn't work on INTL.INF - if modified it like this it doesn't install additional languages Anyway, thanx! I've already have a working idea how to deal with languages Link to comment Share on other sites More sharing options...
Oleg_II Posted December 23, 2005 Author Share Posted December 23, 2005 (edited) Anybody knows the script for taking INF files from say HFDRV folder and placing them renamed and CABed in SOURCESS\I386 folder?For example, if there are 3 INF files in HFDRV - 815.inf, ich3ide.inf, cdma.inf, they will be renamed and CABed into SOURCESS\I386 folder as hfdrv1.in_, hfdrv2.in_ and hfdrv3.inf.There are other files like SYS, BIN, EXE in HFDRV folder too.The names for the INF files may be random (different in each time). Edited December 23, 2005 by Oleg_II Link to comment Share on other sites More sharing options...
Tomcat76 Posted December 23, 2005 Share Posted December 23, 2005 (edited) You could try this but I have no experience with it.for %%i in (HFDRV\*.inf) do makecab /D CompressionType=LZX /D CompressionMemory=21 %%icopy HFDRV\*.in_ SOURCESS\I386del /q HFDRV\*.in_Edit...Ah, I see you want to rename them to hfdrv1, etc. I wouldn't know how to do that. Edited December 23, 2005 by Tomcat76 Link to comment Share on other sites More sharing options...
Oleg_II Posted December 23, 2005 Author Share Posted December 23, 2005 (edited) Tomcat76 That's already something, thanks! for %%i in (HFDRV\*.inf) do makecab /D CompressionType=LZX /D CompressionMemory=21 /L SOURCESS\I386 %%iTwo more parts needed:1. Renaming INF files according to the scheme - hfdrv1.inf, hfdrv2.inf, etc.2. Inserting HFDRV*.INF to DOSNET.INF, LAYOUT.INF and TXTSETUP.INF. Edited December 23, 2005 by Oleg_II Link to comment Share on other sites More sharing options...
tommyp Posted December 23, 2005 Share Posted December 23, 2005 ECHO OFFSETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSIONset /A OLEG=1ECHO [SourceDisksFiles]>>SOURCESS\I386\TXTSETUP.SIFECHO [Files]>>SOURCESS\I386\DOSNET.INFFOR /F "USEBACKQ DELIMS==" %%I in (`DIR /A-D /OGN /B HFDRV\*.INF`) do (copy HFDRV\%%I HFDRV\HFDRV!OLEG!.infMAKECAB /D CompressionMemory=21 /D CompressionType=LZX HFDRV\HFDRV!OLEG!.INF /L SOURCESS\I386DEL /Q /F HFDRV\HFDRV!OLEG!.infset /A OLEG=!OLEG!+1ECHO HFDRV!OLEG!.inf=1,,,,,,,20,0,0 >>SOURCESS\I386\TXTSETUP.SIFECHO d1,HFDRV!OLEG!.inf>>SOURCESS\I386\DOSNET.INF)You need the echo sourcedisksfiles section if you are running this on an hfslipped source. Link to comment Share on other sites More sharing options...
Oleg_II Posted December 24, 2005 Author Share Posted December 24, 2005 (edited) Thanks TommyP Do you think it is worth including in HFSLIP? It's drivers integration part. I though that renaming INF files will be safe for reducing source and you can include this in any part of the script (before or after reducing) PS I forgot, with CABing HFDRV folder source in one HFDRV.CAB and including its entries into DOSNET.INF, LAYOUT.INF and TXTSETUP.SIF too (I suggested the code here. Edited December 24, 2005 by Oleg_II Link to comment Share on other sites More sharing options...
tommyp Posted December 24, 2005 Share Posted December 24, 2005 Sure, I can take care of it after Christmas. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now