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

Is there a way to copy (backup) open or protected files using VB.N

For example the files in a computers windows directory and profile directory
that the application is running on.
Jul 21 '05 #1
4 2853
Not sure what you mean by "protected" ?
It's just no different than usual (ie. you can copy if you have the
appropriate rights, if the file is not exclusively lock etc...).

Have you tried your scenario ? What is the problem you have (error message)
?

Patrice

--

"Bishop" <Bi****@discussions.microsoft.com> a écrit dans le message de
news:BA**********************************@microsof t.com...
For example the files in a computers windows directory and profile directory that the application is running on.

Jul 21 '05 #2
Sorry, yes, I'm referring to the exclusive lock such as the windows registry.

Yes I've tried it with VB6/FSO and with VB.NET. I don't have the code
infront of me to see the error message but it indicates that it can't copy
the file because it's open.

I'm guessing that there is some way to do this because backup software is
able to do it.

"Patrice" wrote:
Not sure what you mean by "protected" ?
It's just no different than usual (ie. you can copy if you have the
appropriate rights, if the file is not exclusively lock etc...).

Have you tried your scenario ? What is the problem you have (error message)
?

Patrice

--

"Bishop" <Bi****@discussions.microsoft.com> a écrit dans le message de
news:BA**********************************@microsof t.com...
For example the files in a computers windows directory and profile

directory
that the application is running on.


Jul 21 '05 #3
Not sure but they might save a backup copy that is maintained by windows. As
this version is not live it should work...

Unless writing a backup software, my personal preference is to delegate this
to a backup software rather than to add backup capabilities into a non
backup related application...

Sorry for the poor help...

Patrice

--

"Bishop" <Bi****@discussions.microsoft.com> a écrit dans le message de
news:EE**********************************@microsof t.com...
Sorry, yes, I'm referring to the exclusive lock such as the windows registry.
Yes I've tried it with VB6/FSO and with VB.NET. I don't have the code
infront of me to see the error message but it indicates that it can't copy
the file because it's open.

I'm guessing that there is some way to do this because backup software is
able to do it.

"Patrice" wrote:
Not sure what you mean by "protected" ?
It's just no different than usual (ie. you can copy if you have the
appropriate rights, if the file is not exclusively lock etc...).

Have you tried your scenario ? What is the problem you have (error message) ?

Patrice

--

"Bishop" <Bi****@discussions.microsoft.com> a écrit dans le message de
news:BA**********************************@microsof t.com...
For example the files in a computers windows directory and profile

directory
that the application is running on.


Jul 21 '05 #4
Greetings Bishop,

Take a look at the System.IO Namespace, in special the File object.
There's a shared method Copy that copies one file to another location.

However it doesn't make bulk copies (ie, copy multiple files). for this
you should start thinking about multi-threads, in order to speed up, or
not (ie, the same way Windows Explorer does).

As for "exclusive locked" files, there's not much to be done. Not even
Backup Applications can open a file that's already open with an
"Excluside Lock". (Please, don't take my word on it, try it :)

Regards,

Paulo

Jul 21 '05 #5

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

Similar topics

0
by: durumdara | last post by:
Hi ! I have some backup files on a server farm. I want to store these local backup files on a backup file server for "safety's snake". These files are compressed zip files with 12 character...
6
by: Charles Morrall | last post by:
I have no experience with DB2 as such, but I've been tasked with configuring backup of a server running DB2 v8 on Windows Server 2003. I do have some experience with backups in general though. The...
5
by: Deano | last post by:
I'm experiencing bloat problems when I restore my backup files. Users can take a look at the reports of any previous backup without having to ensure they have a backup of their current data - this...
4
by: Bishop | last post by:
For example the files in a computers windows directory and profile directory that the application is running on.
5
by: kebuchan | last post by:
Hi all, I know this is possible in Oracle but has anyone done it in DB2 and could you maybe direct me to some documentation or let me know how I would go about doing it? In the oracle world...
5
by: hula | last post by:
Hello i'm looking for some tool to backup some data but as i don't seem to find one that fits my needs i'll start implementing it by my own. Here's some funktions i need to have: - Backup...
6
by: Samuel | last post by:
I am trying to write a small utility program that backs up a list of files/folders I need to back up all files including those that are opened, is ther a way of doing that? (it seems that...
3
by: rubbishemail | last post by:
Hello, do you know of any way to copy locked / opened files under win xp? I know there is something like "Volume Shadow Copy" but I don't know how to use it. Maybe someone already has a python...
3
by: maheshkadam | last post by:
Hi friends I am new to perl so please guide me. I have one application which created backup log file every day.But it appends that file so you can see logs for different day in one file only. ...
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.