How do I copy files over intermittent network connection?
sourceFile = Compress("*.*");
destFile = "X:files.zip";
int copyFlags = COPYFILEFAILIFEXISTS | COPYFILERESTARTABLE;
while (CopyFileEx(sourceFile, destFile, null, null, false, copyFlags) == 0) {
do {
// optionally, increment a failed counter to break out at some point
Sleep(1000);
while (!IsNetworkAlive(NETWORKALIVELAN));
}
Tags: windows vb6 wireless network-programming intermittent
Source: By Eric Pohl as answer to the question
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 2.5
Related code-snippets:
- Embedding Windows Media Player for all browsers. Will help in making it portable.
- Register Windows program with mailto protocol programmatically.
- How do I see preview JPEG file of PDF on Windows?
- What are the best ways to access Exchange using PHP?
- Visual Studio Setup Project - Per User Registry Settings.
- How do I use Mutex in Visual Basic?
- What is the best file copy alternative than the Windows defaults?
- How can I retrieve a windows filename?
- How do I install Debian in Windows?
- Windows Equivalent of 'nice'.
- How do you create your own moniker (URL Protocol) on Windows systems?
- Registry vs. INI file for storing user configurable application settings. In Linux, registry vs. INI file for storing user configurable applications settings.
- How can I redirect stderr from calls to fprintf?
- How do I wrap RSYNC for Windows?
- How can I obtain good concurrent read performance from disk?