Цитата:
Сообщение от kos100pudov
как использовать WinXiso для конвертации xxl в pgm именно из ком.строки?
|
Код HTML:
-o <filename> Converts a program in ASCII format (with XXL extension) into a program in PGM format and assigns a <filename> (mandatory).
-x <filename> Converts a program in PGM format into a program in ASCII format (with XXL extension)
This option excludes options -o and -l.
-i <filename> Produces a file in ASCII format (with .INF extension) with the results of the translation:
- [LINES]=<number of instructions converted>
- [ERRORS]=<number of errors found>
-l <filename> Produces a program list in ASCII format (with .LST extension).
-s Prevents windows from opening on the screen.
-v Together with the -x option, compiles/breaks down the EPL section of a program. To breakdown, select the .PGM file: a .XXL file and a separate .EPL file will be created. To compile, select a .XXL file and insert the name of the .EPL file after the -v option: a .PGM file containing the EPL section will be created.
-t In conjunction with the -1 option, adds the table of symbols to the list of programs.
-f <bitmap> Adds the specified bitmap image to the program.
**
· WinXiso always tries to translate an ASCII file into PGM, unless the -x option is specified.
· <filename> can be any file name composed of a maximum of 8 characters plus three characters for the extension, preceded by the path if necessary. For option -o the file name is mandatory; for the other options it is optional (if not specified, the selected file name is used again with a different extension).
Example of WinXiso recalled from an external application:
...
WinExec("c:\\tools\\WinXiso.exe ..\\test\\sample.xxl -s -i",SW_SHOW);
...
When the control reaches this point the translation is terminated; therefore, the ..\test\sample.inf. file can be controlled.
Для пакетной обработки можно завернуть в *.bat обозначив маску обрабатываемых файлов, путь, типа вот так
PHP код:
@echo off
chcp 866 >nul
SetLocal EnableExtensions
set mask=*.xxl
set folder=.
set /p ch="Конвертировать файлы %mask% в папке %folder% ? (Y/N) "
if /i "%ch%" neq "y" goto :eof
set /a n=0, c=0
call :GetFilesCount "%Folder%" "%mask%" c
"%folder%\WinXiso.exe" "%folder%\%mask%" -s -i
call :GetFilesCount "%Folder%" "%mask%" n
echo Успешно конвертировано: %n% из %c% файлов.
pause & goto :eof
:GetFilesCount [_in_Folder] [_in_Mask] [_out_Variable that receive a bufer]
for /f "delims=" %%f in ('2^>NUL dir /b /s /a-d "%~1\%~2" ^| find /c /v ""') do set %~3=%%f
exit /B