For Programmers: Free Programming Magazines  


Home > Archive > VC Language > January 2006 > ftp file pointers - help









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ftp file pointers - help
Acha

2006-01-26, 7:08 pm

Help!

I am trying to write to a file on the web. I am using InternetWriteFile, is
there a file pointer function so that I can go to a location in the file and
write to it? Or do I have to keep writing the whole file?

Any help would be appreciated.

Acha
Scherbina Vladimir

2006-01-26, 7:08 pm

For wininet related questions use
microsoft.public.inetsdk.programming.wininet NG.

InternetWriteFile does not support setting file pointer, you may use file
pointers only for reading from the web (InternetSetFilePointer with
InternetReadFile).

--
Vladimir

"Acha" <Acha@discussions.microsoft.com> wrote in message
news:C03B5667-1ACE-498B-91D7-BA0700F7CCDF@microsoft.com...
> Help!
>
> I am trying to write to a file on the web. I am using InternetWriteFile,
> is
> there a file pointer function so that I can go to a location in the file
> and
> write to it? Or do I have to keep writing the whole file?
>
> Any help would be appreciated.
>
> Acha



Igor Tandetnik

2006-01-26, 7:08 pm

Acha <Acha@discussions.microsoft.com> wrote:
> I am trying to write to a file on the web. I am using
> InternetWriteFile, is there a file pointer function so that I can go
> to a location in the file and write to it? Or do I have to keep
> writing the whole file?


FTP protocol does not support writing arbitrary portions of the file.
You can append to the end of an existing file with APPE command. See KB
Article KB182316 "INFO: FTP Append Functionality not Available from
WinInet".
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


Acha

2006-01-26, 7:08 pm

Thanks.
Is there another way of writing to a file apart from ftp so that I can have
a file pointer?
Acha

"Igor Tandetnik" wrote:

> Acha <Acha@discussions.microsoft.com> wrote:
>
> FTP protocol does not support writing arbitrary portions of the file.
> You can append to the end of an existing file with APPE command. See KB
> Article KB182316 "INFO: FTP Append Functionality not Available from
> WinInet".
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>
>
>

Igor Tandetnik

2006-01-26, 7:08 pm

Acha <Acha@discussions.microsoft.com> wrote:
> Is there another way of writing to a file apart from ftp so that I
> can have a file pointer?


What are you trying do to? What is your server capable of? Do you have
any control over the code running on the server?

If you have a local copy of the file that is very similar to a remote
copy (perhaps you downloaded and modified it) and you want to
synchronize the remote copy, look into setting up an rsync server:

http://www.samba.org/rsync/

--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


Acha

2006-01-27, 8:01 am

Thanks for your help.

Acha

"Igor Tandetnik" wrote:

> Acha <Acha@discussions.microsoft.com> wrote:
>
> What are you trying do to? What is your server capable of? Do you have
> any control over the code running on the server?
>
> If you have a local copy of the file that is very similar to a remote
> copy (perhaps you downloaded and modified it) and you want to
> synchronize the remote copy, look into setting up an rsync server:
>
> http://www.samba.org/rsync/
>
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com