473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to extract my file ?

i got a program that creates a file then adds a file on top of that file so how would i go on and extract this file? here is my code.
Jan 12 '11 #1
5 1791
Banfa
9,065 Expert Mod 8TB
You are not writing enough information into your archive file to be able to extract the files again afterwards.

At the very least you need to record somewhere where the end (or beginning) of each file is so that you can find them again to extract the right bit.
Jan 12 '11 #2
yeah thats the problem i have i dont have a clue where to start
Jan 12 '11 #3
Banfa
9,065 Expert Mod 8TB
You could do something as simple as get the size of the file first and write that to the archive before you write the file itself. Then the archive would contain a list of size then data then size then data etc and you could easily skip through to extract the second or third file if you wanted.

You could go further and store the name of the file as well.
Jan 12 '11 #4
its easily said then done, file archiver not a gd thing for a novice programmer to start on
Jan 12 '11 #5
weaknessforcats
9,208 Expert Mod 8TB
Have you got a design on paper? It's kinda hard to just start coding when you have no roadmap.
Jan 12 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: mtech1 | last post by:
Access 2000 I need to extract just the filename from a path. Ex: path is- c:\MyApp\Sub\MyApp.exe I need to capture just the file name regardless of the size of it's name. For the above...
5
by: Kristoffer Persson | last post by:
It's probably very simple... I would like to know if there is a function similar to ExtractFileName() (I've used it in Delphi), which returns only the file name from the full path, e.g....
3
by: Bill | last post by:
Is there a method that will take a full path and filename as a parameter and return just the filename? I am currently using the following code but it is extremely slow for files on a DVD. for...
3
by: blakecaraway | last post by:
Hi there. I have a C# console application that extracts data to flat files. Some of my business partners begin consuming these extract files before I've had a chance to write the newest ones (I...
1
by: Miki Peric | last post by:
Which .Net function I should use to extract file name from URL/path?
5
by: steve | last post by:
How can someone extract the file name and file path from a complete path? ex: c:\mydir\subdir\temp\myfile.txt will give: path = c:\mydir\subdir\temp filename = myfile.txt TIA
4
by: Alan T | last post by:
I got a string. eg. C:\Temp\Documents\MyDoc.doc How do I get the name of the document only? ie. MyDoc.doc
7
by: akshar108 via DotNetMonster.com | last post by:
i want to read pdf file and extract file without any component in .net if it is possible the please tell me -- Message posted via DotNetMonster.com...
2
by: veenna | last post by:
Hi, how can i get the binary data from database and convert to text/excel format in asp.net. i know the extract file format. how can i give the down load option for the extract file ?' regards,...
5
by: progvar | last post by:
Hi, i want to know how to unzip a zip file and extract the files to a particular location please help me thanks in advance varinder
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.