| View previous topic :: View next topic |
| Author |
Message |
trapper Contributor


Joined: 28 Jan 2005 Posts: 112 Location: Brisbane, Australia
|
Posted: Thu Jan 17, 2008 9:34 am Post subject: Vista and updating of file size |
|
|
I have an application that transfers large files to the PC on which it is running. It does this by starting another application (curl.exe) to do the actual transfer and then monitoring the size of the transferred file and displaying the progress.
I use @file() to check the size of the file as it's being received. This works fine on XP but not on Vista. It seems with Vista that the file size isn't updated until the transferring application closes. Before then, all @file() retrieves is a size of zero bytes. If I close the transfer having only partially transferred the file, and then restart it, @file() returns the size the file was when the initial transfer was closed. It won't update again until curl.exe is closed again.
I initially thought it was something to do with how @file() behaves under Vista, but I also opened an Explorer window to observe the file. Again, the file size doesn't update while the transfer is actually taking place (unlike XP). I also opened a CMD.exe window and did several 'dir' commands... again, no update until the transfer stopped.
Is this standard behaviour with Vista or is something weird going on? _________________ John Trappett |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Thu Jan 17, 2008 6:33 pm Post subject: |
|
|
Likely vista is using a memory buffer to hold the file and then write to disk once the entire file is received. This has the benefit of not having to write to the disk until the file is completely received (less disk writes) and also to ensure the entire file has properly been received so files that are not corrupted or partially transferred are written to disk.
Obviously in your situation it doesn't help because you aren't able to determine the correct file size.
You could use the VDSIPP to do a file transfer, one benefit it has is that it gives you the amount of data sent/received directly from the file buffer and is pretty accurate. You can use a local network address if you aren't transfering over the internet. |
|
| Back to top |
|
 |
trapper Contributor


Joined: 28 Jan 2005 Posts: 112 Location: Brisbane, Australia
|
Posted: Thu Jan 17, 2008 8:17 pm Post subject: |
|
|
Thanks PG. I thought that maybe the case but I haven't been able to find any info on it. Unfortunately, I'm not sure I can use VDSIPP as I need to be able to resume transfers and I don't think VDSIPP supports that. _________________ John Trappett |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Fri Jan 18, 2008 2:04 am Post subject: |
|
|
| VDSIPP Helpfile wrote: | INTERNET HTTP,RANGE,<http client>,<start-byte>,<end-byte>
This command allows you to download a certain part of a file. This allows you to only download portions of a file when you choose to. It's convenient as it allows you to resume a download or only download the part of a file you need. The <start-byte> parameter specifies the byte where to start the download. The <end-byte> parameter specifies the byte where to stop the download. This command will only work with the INTERNET HTTP,DOWNLOAD command, to download portions of a file. Please note that not all http servers allow you to specify the RANGE, you should check by trying to download portions of a file from the http server in question to see if it works or not. Also note that the RANGE will only work on binary/downloadable type files.
|
|
|
| Back to top |
|
 |
trapper Contributor


Joined: 28 Jan 2005 Posts: 112 Location: Brisbane, Australia
|
Posted: Fri Jan 18, 2008 2:24 am Post subject: |
|
|
| Aslan wrote: | | VDSIPP Helpfile wrote: | INTERNET HTTP,RANGE,<http client>,<start-byte>,<end-byte>
This command allows you to download a certain part of a file. This allows you to only download portions of a file when you choose to. It's convenient as it allows you to resume a download or only download the part of a file you need. The <start-byte> parameter specifies the byte where to start the download. The <end-byte> parameter specifies the byte where to stop the download. This command will only work with the INTERNET HTTP,DOWNLOAD command, to download portions of a file. Please note that not all http servers allow you to specify the RANGE, you should check by trying to download portions of a file from the http server in question to see if it works or not. Also note that the RANGE will only work on binary/downloadable type files.
|
|
The transfers have to be done using the FTP protocol. _________________ John Trappett |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Fri Jan 18, 2008 3:51 am Post subject: |
|
|
| Hmmm, are you saying can you get status with @file(), XP and curl.exe??? |
|
| Back to top |
|
 |
trapper Contributor


Joined: 28 Jan 2005 Posts: 112 Location: Brisbane, Australia
|
Posted: Fri Jan 18, 2008 6:03 am Post subject: |
|
|
| Aslan wrote: | | Hmmm, are you saying can you get status with @file(), XP and curl.exe??? |
The actual transfer is done with curl.exe. Under XP I can get a progressive update of the filesize with @file(,Z). I can't under Vista because the filesize doesn't update until the transfer has stopped. _________________ John Trappett |
|
| Back to top |
|
 |
|