How to copy files in background, without slowing user interaction

S

sandal

I have an app that needs to copy files over a vpn in the background. I'm
finding FileCopy pretty much takes over when it's running, user
interaction with the interface is relegated to some lower priority. I
want the file copy operation to take place in the background.

The FileCopy operation runs periodically via a form timer event. I've
tried DoEvents and it didn't seem to help. I found that running the
filecopy operation in a separate instance of Access made things a lot
smoother, probably because windows is better at sharing the cpu than
Access is.

Is there any way in code that I can get FileCopy, or the
FileSystemObjects method like it, to work in the background? I don't
wish to split the file copy operation into a separate Access file if I
can help it.
 
A

Albert D. Kallal

You could have the user launch a 2nd copy, or program JUST for that copy
process, and then they simply go back to work on the original.

And, you could even just tell the person to go and launch another copy of
the same program and go back to work with whatever they were doing....
 
S

sandal

You could have the user launch a 2nd copy, or program JUST for that copy
process, and then they simply go back to work on the original.

And, you could even just tell the person to go and launch another copy of
the same program and go back to work with whatever they were doing....
Not in this case; I'd have to split it into two parts.

Anyone know of a way to avoid splitting it into two applications? A way
to tone down the way Access devotes itself to the file copy operation?
 
M

Mike Burek

If you can run a dos command, try using RoboCopy. It's an addon from MS you
have to download separately and is a great and powerful way to copy files.
It has an option to set the speed of the transfer. I used it a lot in batch
programming.
 
S

sandal

Thanks...both of you. Robocopy might be an option for this use. I've
been experimenting with xcopy, that might do the trick too.
 
D

dataentryoutsorcing

I have an app that needs to copy files over a vpn in the background. I'm
finding FileCopy pretty much takes over when it's running, user
interaction with the interface is relegated to some lower priority. I
want the file copy operation to take place in the background.

The FileCopy operation runs periodically via a form timer event. I've
tried DoEvents and it didn't seem to help. I found that running the
filecopy operation in a separate instance of Access made things a lot
smoother, probably because windows is better at sharing the cpu than
Access is.

Is there any way in code that I can get FileCopy, or the
FileSystemObjects method like it, to work in the background? I don't
wish to split the file copy operation into a separate Access file if I
can help it.
Data Entry Outsourcing provides data entry services like numeric data
entry, textual data entry, image data entry, data format, data
conversion and also online data entry, offline data entry with 99.98%
accuracy and time bound.

Data Entry Outsourcing Services ensures high quality, result oriented
in time. We promise to deliver excellent output at low turn around
times and cost-effective rates. Our dedicated team of highly
experienced professionals to provide you high quality outsourcing
services. Do visit us at http://www.dataentryoutsourcing.co.uk/dataentry_services.php,
to know more about our Data Entry Outsourcing Services and avail our
services at affordable rates.

E-mail Us: (e-mail address removed)
Phone (India): +91-794-000 3000
Fax : +91-794-000 3002.
 
S

sandal

xcopy runs asynchronously, so the file transfers are being handled
better, in the background. However, executed via shell, xcopy remains
running after the file transfer is complete. It's visible in task
manager...how can I get it to die off when the transfer is complete?
Noting in shell help or xcopy help on this that I've found so far.
 
G

GeoffG

how can I get it to die off when the transfer is complete?
Don't know.

However, can you copy files over the VPN using a batch file?
If so, you could use the Shell function to run the batch file.
I think this wouldn't leave anything in memory.

If you're using XCOPY with its /S switch (to copy subdirectories), you could
get VBA to write the batch file listing all subdirectories/files. (Several
ways to write out the batch file but perhaps using a Scripting TextStream
object is the easiest.)

Geoff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top