473,239 Members | 1,549 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,239 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 1880
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: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.