473,394 Members | 2,063 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,394 software developers and data experts.

SECURE way to copy parts of a file

Hi,

I need a SECURE way to copy parts of a file. I'm having files which contains
a whole bunch of records. In one 'fysical' file I'm having one or more
logical files.

What I need to do is to copy a logical file (a part of the fysical file)
into a new file. But the 'big' problem is: these records contains
bankstatements, so I can't take the risk that there would be a record
missing, or even one little charachter. The copy I make has to be an
identical copy of the part in the the first file. There can't be a return
too much or too less or something like that.

Does anybody knows a method that ensures me that it will really take that
part of the file and nothing less or more?

Some things that maybe can help to find an easier solution: The logical
files always start at the beginning of a record, so it are always full
records I need to copy, and the records of a logical record are always
grouped together (they aren't mixed up).

It's something like this:
FYSICAL FILE:
record 1: header logical file 1
record 2: data logical file 1
record 3: data logical file 1
....
record 2353: data logical file 1
record 2354: trailer logical file 1
record 2355: header logical file 2
record 2356: data logical file 2
....
record 6222: data logical file 2
record 6223: trailer logical file 2
record 6224: header logical file 3
record 6225: data logical file 3
....
record 8500: data logical file 3
record 8501: trailer logical file 3

I should find a secure way that kind of copy's the whole piece in once (from
header until trailer, like for exemple record 2355 until 6223 in on piece).

Anybody can help me with this?

Thanks a lot in advance,

Pieter
Nov 20 '05 #1
5 1886
Cor
Hi Pieter,

Does the old method of writing it, and then reading it back and comparing it
help you?

Cor
Nov 20 '05 #2
I can use that (and I guess I will), but it's not really a 'nice' way, hehe.
I guess I'm gonna use that to evaluate it, but it would be nice if I'm
having a way that kind of cuts the whole part and pastes it somewhere else,
and than evaluate if it worked fine or not.

"Cor" <no*@non.com> wrote in message
news:OQ**************@TK2MSFTNGP11.phx.gbl...
Hi Pieter,

Does the old method of writing it, and then reading it back and comparing it help you?

Cor

Nov 20 '05 #3
Cor
I am not sure, because a code let say that german S what you probably use in
Belgie also, can maybe give in all other solutions give problems when a
station has a wrong language code.

I think you never are totally sure, but I can get nothing better than what I
told you what I would do.

Although thinking it over it would be better to avoid all for us "strange"
characters (but even the Euro character is).

I think that it can always be readed on another way on an other station than
you did write it when the language code is different.

But I have no solution for you for that else than keeping it with the 7 bit
ASCII code but that is to less I gues.

I show it I send you the name of my wife, I think that it will be on your
computer a strange name.

Grazyna.

It has to be Grazyna with a dot on the z.

Cor
Nov 20 '05 #4
Hm, the test with the name of your wife didn't work, maybe you can send your
wife herself so I can redo the test ;-)

There aren't any 'strange' characters in the files: no euro symbol, etc.

But what I actually need is to be able to say: give me the part of that
message, form that line until that line. And not reading the lines and
concattenating the lines myself.

But I guess there isn't something like that, hehe.

Thanks anyways.

"Cor" <no*@non.com> wrote in message
news:OZ**************@TK2MSFTNGP12.phx.gbl...
I am not sure, because a code let say that german S what you probably use in Belgie also, can maybe give in all other solutions give problems when a
station has a wrong language code.

I think you never are totally sure, but I can get nothing better than what I told you what I would do.

Although thinking it over it would be better to avoid all for us "strange"
characters (but even the Euro character is).

I think that it can always be readed on another way on an other station than you did write it when the language code is different.

But I have no solution for you for that else than keeping it with the 7 bit ASCII code but that is to less I gues.

I show it I send you the name of my wife, I think that it will be on your
computer a strange name.

Grazyna.

It has to be Grazyna with a dot on the z.

Cor

Nov 20 '05 #5

"DraguVaso" <pi**********@hotmail.com> wrote in message
news:40*********************@news.skynet.be...
Hi,

I need a SECURE way to copy parts of a file. I'm having files which contains a whole bunch of records. In one 'fysical' file I'm having one or more
logical files.

What I need to do is to copy a logical file (a part of the fysical file)
into a new file. But the 'big' problem is: these records contains
bankstatements, so I can't take the risk that there would be a record
missing, or even one little charachter. The copy I make has to be an
identical copy of the part in the the first file. There can't be a return
too much or too less or something like that.

Does anybody knows a method that ensures me that it will really take that
part of the file and nothing less or more?

Some things that maybe can help to find an easier solution: The logical
files always start at the beginning of a record, so it are always full
records I need to copy, and the records of a logical record are always
grouped together (they aren't mixed up).

It's something like this:
FYSICAL FILE:
record 1: header logical file 1
record 2: data logical file 1
record 3: data logical file 1
...
record 2353: data logical file 1
record 2354: trailer logical file 1
record 2355: header logical file 2
record 2356: data logical file 2
...
record 6222: data logical file 2
record 6223: trailer logical file 2
record 6224: header logical file 3
record 6225: data logical file 3
...
record 8500: data logical file 3
record 8501: trailer logical file 3

I should find a secure way that kind of copy's the whole piece in once (from header until trailer, like for exemple record 2355 until 6223 in on piece).
Anybody can help me with this?

Thanks a lot in advance,

Pieter

Long time no see kiddies! I think in addition, why don't you look into
useing hash values for the files. .NET can generate MD5 hashes for files,
and if 1 charactor changes, basically, any bit change in the file will
change the hash and make the files not compaire. I replaced all my checksum
systems (CRC, GNU-GPC) with MD5 hashes because it's quick and in the
framework already. I do have a class alread built if you need something to
start with.

HTH
Sueffel
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004
Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Boris Genc | last post by:
Hi everybody. I was wandering is there a method or a function already implemented in python that supports secure deletion of data? I'm interested in something which is able to securely wipe data...
6
by: Maria L | last post by:
I have a client who needs to copy an existing sale. The problem is the Sale is made up of three tables: Sale, SaleEquipment, SaleParts. Each sale can have multiple pieces of equipment with...
7
by: Dan V. | last post by:
Situation: I have to connect with my Windows 2000 server using VS.NET 2003 and C# and connect to a remote Linux server at another company's office and query their XML file. Their file may be...
68
by: Roman Ziak | last post by:
Hello, I just downloaded MS Visual Studio 2005 Express Beta. When I tried to compile existing valid project, I get a lot of warnings like 'sprintf' has been deprecated, 'strcpy' has been...
2
by: Mullin Yu | last post by:
i want to find a secure ftp library for uploading and downloading files.
4
by: jack | last post by:
Hi all I have have a web service in c$ which was a pretty easy task, but the task seemd to be difficult when came to security.. i have had a vb6 application which sends xml file and gets a request...
14
by: Usman | last post by:
Hi I'm working on an application that contains classes for licensing, authentication etc, including all the algorithms of encryption/decryption etc. I wanted to secure this code, but after...
1
by: Todd Sparks | last post by:
I am developing with VB.NET 2005 and I need to copy a file from somewhere on the users machine to a secured location on the server. I am creating an image archive system that will allow users to...
19
by: Khafancoder | last post by:
Hi guys, in my db i have these three tables 1.Stores 2.Products 3.Parts their structure is something like : Stores ----Products ----Parts
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.