CodeBase - ADDPAK

Return to the CodeBase listing

Category: Complete Applications

Version: 1.0

0
0

Information

Uploaded: 22nd Apr 2005 11:59

Modified: 24th Apr 2005 13:01

Author:  Anonymous Coder

Summary

Rem * T�­tulo : Creacion de archivos PAK Rem * Autor : HJOM Rem * Fecha : 11 de Abril 2005 rem -------------------------------------------- rem Este programa utiliza acceso a fichero secuencial, rem para crear archivos PAK rem -------------------------------------------- print "Esta es una utilidad para crear archivos PAK de DarkBasic 1.13" print " " print " " print "Modifique o Cree un archivo de nombre 'filesadd.txt', en donde podra colocar cualquier" print "tipo de archivo para agregar a un archivo PAK." print "Como se muestra en la siguientes estructura y en el ejemplo" print " " print "estructura:" print " [nombre_archivo]" print " [#_archivos]" print " [arch01]" print " ..." print " [archn]" print " " print "ejemplo:" print " mypak.pak" print " 8" print " c:imga01.bmp" print " c:imga02.bmp" print " c:imga03.bmp" print " c:mmediaa01.avi" print " c:mmediaa02.avi" print " c:mmediaa01.wav" print " c:mmediaa02.wav" print " c:othera01.dll" goto _salir

Full Description

Rem * T&Atilde;ƒ&iuml;&iquest;&frac12;&Atilde;‚&Acirc;&shy;tulo : Creacion de archivos PAK<br /> Rem * Autor : HJOM<br /> Rem * Fecha : 11 de Abril 2005<br /> rem --------------------------------------------<br /> rem Este programa utiliza acceso a fichero secuencial,<br /> rem para crear archivos PAK<br /> rem --------------------------------------------<br /> <br /> remstart<br /> estructura<br /> [nomb_arch]<br /> [n_arch]<br /> [arch01]<br /> ...<br /> [archn]<br /> <br /> ejemplo<br /> mypak.pak<br /> 8<br /> c:imga01.bmp<br /> c:imga02.bmp<br /> c:imga03.bmp<br /> c:mmediaa01.avi<br /> c:mmediaa02.avi<br /> c:mmediaa01.wav<br /> c:mmediaa02.wav<br /> c:othera01.dll<br /> remend<br /> <br /> cls<br /> <br /> rem comprobando<br /> a=FILE EXIST(&quot;filesadd.txt&quot;)<br /> if a=0<br /> print &quot;ERROR: El Archivo 'filesadd.txt' no existe&quot;<br /> print &quot; &quot;<br /> goto _help<br /> endif<br /> a=FILE SIZE(&quot;filesadd.txt&quot;)<br /> if a=&lt;0<br /> print &quot;ERROR: El Archivo 'filesadd.txt' esta vacio&quot;<br /> print &quot; &quot;<br /> goto _help<br /> endif<br /> <br /> rem cargar datos<br /> print &quot;Cargando datos...&quot;<br /> open to read 1,&quot;filesadd.txt&quot;<br /> <br /> read string 1,filename$ : print filename$<br /> read string 1,a$ : nfile=val(a$)<br /> <br /> dim files$(nfile)<br /> <br /> for x=1 to nfile<br /> files$(x)=&quot;&quot;<br /> read string 1,a$<br /> if len(a$)&gt;4 then if file exist(a$)=1 then files$(x)=a$<br /> next x<br /> close file 1<br /> <br /> print &quot;Creando archivo pak...&quot;<br /> open to write 1,filename$<br /> <br /> for x=1 to nfile<br /> if files$(x)&lt;&gt;&quot;&quot;<br /> print &quot;agregado... &quot;+files$(x)<br /> write fileblock 1,files$(x)<br /> endif<br /> next x<br /> close file 1<br /> <br /> rem Creando archivo log<br /> print &quot;Creando archivo log...&quot;<br /> open to write 1,&quot;filesex.log&quot;<br /> <br /> write string 1,str$(nfile)<br /> for x=1 to nfile<br /> if files$(x)&lt;&gt;&quot;&quot;<br /> print &quot;agregado... &quot;+files$(x)<br /> write string 1,files$(x)<br /> endif<br /> next x<br /> close file 1<br /> <br /> rem terminar<br /> print &quot;Proceso terminado&quot;<br /> <br /> rem Final del programa<br /> _salir:<br /> print &quot; &quot;<br /> print &quot;Presione cualquier tecla para salir&quot;<br /> suspend for key<br /> end<br /> <br /> rem ayuda del programa<br /> _help:<br /> print &quot;Esta es una utilidad para crear archivos PAK de DarkBasic 1.13&quot;<br /> print &quot; &quot;<br /> print &quot; &quot;<br /> print &quot;Modifique o Cree un archivo de nombre 'filesadd.txt', en donde podra colocar cualquier&quot;<br /> print &quot;tipo de archivo para agregar a un archivo PAK.&quot;<br /> print &quot;Como se muestra en la siguientes estructura y en el ejemplo&quot;<br /> print &quot; &quot;<br /> print &quot;estructura:&quot;<br /> print &quot; [nombre_archivo]&quot;<br /> print &quot; [#_archivos]&quot;<br /> print &quot; [arch01]&quot;<br /> print &quot; ...&quot;<br /> print &quot; [archn]&quot;<br /> print &quot; &quot;<br /> print &quot;ejemplo:&quot;<br /> print &quot; mypak.pak&quot;<br /> print &quot; 8&quot;<br /> print &quot; c:imga01.bmp&quot;<br /> print &quot; c:imga02.bmp&quot;<br /> print &quot; c:imga03.bmp&quot;<br /> print &quot; c:mmediaa01.avi&quot;<br /> print &quot; c:mmediaa02.avi&quot;<br /> print &quot; c:mmediaa01.wav&quot;<br /> print &quot; c:mmediaa02.wav&quot;<br /> print &quot; c:othera01.dll&quot;<br /> goto _salir

Comments

No comments yet.