Qbasicnews.com
December 06, 2019, 01:08:20 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Write a program for file "changing"  (Read 3061 times)
Wizard Genius
Member
*
Posts: 57


WWW
« on: April 23, 2004, 08:18:07 PM »

I don't know how to make the subject just right, but here's the challenge:

Make a program in VBDOS or maybe just QBasic (use a GUI or TUI, not just command-line "type a filename:" stuff) that:

-Splits Huge files to smaller files
-Takes a split file and makes it back into one
-Packs many files together into one
-Unpacks one file back to multiple ones (from above)
-Opens a binary file and converts it to text (such as XX3402, used in SWAG Pascal - do a google search and download it, it comes with Pascal Source)
-Take a text file and convert it back to binary (from above)

Of course, all operations will need to use binary mode so one can pack/unpack or split/unsplit Binary files (EXE's, ZIP's, etc). Like I said, it should be in VBDOS or some other TUI or even better a GUI (but only if it isn't flashy). Make it fast and easy to use (not command-line). Send it to qbspot@zwallet.com for rating.
Logged

rogramming is like life - you work first, then play. :bounce: :rotfl: :bounce: :rotfl: :bounce: :rotfl: :bounce: :rotfl: :bounce: :rotfl: :bounce: :rotfl: :bounce:
Plasma
Na_th_an
*****
Posts: 1770


WWW
« Reply #1 on: April 23, 2004, 08:40:33 PM »

Get me a beer while you're at it.
Logged
Mango
Wandering Guru
***
Posts: 360



« Reply #2 on: April 24, 2004, 01:04:06 AM »

Quote from: "Plasma"
Get me a beer while you're at it.


Get me one while you're at it, and I'll send you WinZip + UUencode to do what you need...
Logged
Wizard Genius
Member
*
Posts: 57


WWW
« Reply #3 on: April 27, 2004, 10:35:21 PM »

I just want to see what people come up with. You see, I can never make code for binary files work. I can make other peoples code work, but if I try to duplicate their code with even slight changes, it doesn't work. So I'm wondering what I'm missing, why other peoples code works, but my version of their code doesn't, why the heck this won't work:

Code:
do
            i = i + 1
            open "C:\binfile.bin" for binary as #1
              open "C:\binfile.bin" for binary as #2
              get #1, i, inbit$
              put #2, i, inbit$
          loop until eof(1)
          close #2
          close #1


I wondered why the heck that doesn't work. Any suggestions?
Logged

rogramming is like life - you work first, then play. :bounce: :rotfl: :bounce: :rotfl: :bounce: :rotfl: :bounce: :rotfl: :bounce: :rotfl: :bounce: :rotfl: :bounce:
Anonymous
Guest
« Reply #4 on: April 27, 2004, 10:43:59 PM »

me too  Shocked

my ??cryptor works on anything but exe!! the files compare the exact same what gives?? cmon geniuses  Tongue
Logged
CGI Joe
Member
*
Posts: 61



« Reply #5 on: April 28, 2004, 08:38:41 AM »

It does work, it does exactly what you told it to do Wink

Maybe you mean this though?
Code:

 
open "C:\binfile.bin" for binary as #1
open "C:\binfile2.bin" for binary as #2

dim inbyte as string * 1

do
    get #1, , inbyte
    put #2, , inbyte
loop until eof(1)
close

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!