Quote: "ok let me rephrase this all. All i need to know is if the code is possible the only was i know to use the pak files is like this
all i need to know is if their is a way to write all the files in the directory with one command ant read them as well."
It's definitely possible in Darkbasic... but it won't be on a single line... and not like you wrote. The commands "read file" and "write file" are intended to write a single variable (that uses 4 bytes)... not an entire file.
I looked up what a .pak file is... i've never heard of it before. I found a site that talks about the structure of a pak file and has C++ examples on how to do it. Just looking at it should give you the general idea of what you need to do. If the program you want is intended to use the .pak files you create with other programs (that you didn't write) you'll have to find out exactly what encryption they use.
If it's not for other programs you don't have to go into all the details in the header. Just use a string that your program can read (when you want to unpack) to see if the pak file is made by your program. Then the filenames with the total number of bytes each file takes up, then the files themselves (use the total bytes for each file to determine where to start and stop reading the bytes in the pak file).
Unfortunately this will be a lot harder to do in Classic than in Pro (because you can't use UDT's or make variables as anything other than a string, integer, and float).
http://www.gamedev.net/reference/articles/article1991.asp
Quote: "ps sorry i understand i didnt word the question very well"
It's ok. Sorry about being rude to you.