forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Vista and updating of file size

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
trapper
Contributor
Contributor


Joined: 28 Jan 2005
Posts: 112
Location: Brisbane, Australia

PostPosted: Thu Jan 17, 2008 9:34 am    Post subject: Vista and updating of file size Reply with quote

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
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Thu Jan 17, 2008 6:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
trapper
Contributor
Contributor


Joined: 28 Jan 2005
Posts: 112
Location: Brisbane, Australia

PostPosted: Thu Jan 17, 2008 8:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Fri Jan 18, 2008 2:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
trapper
Contributor
Contributor


Joined: 28 Jan 2005
Posts: 112
Location: Brisbane, Australia

PostPosted: Fri Jan 18, 2008 2:24 am    Post subject: Reply with quote

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
View user's profile Send private message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Fri Jan 18, 2008 3:51 am    Post subject: Reply with quote

Hmmm, are you saying can you get status with @file(), XP and curl.exe???
Back to top
View user's profile Send private message Send e-mail
trapper
Contributor
Contributor


Joined: 28 Jan 2005
Posts: 112
Location: Brisbane, Australia

PostPosted: Fri Jan 18, 2008 6:03 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group