Amiga-C (58/223)

From:Jack York
Date:11 Aug 2001 at 04:57:57
Subject:[amiga-c] Re: How do I copy clone

Hello Stephen

On 11-Aug-01, Stephen Illingworth wrote:
> Hello Jack
>> This works except for SetFileDate. I even tried
>>
>> struct DateStamp ds;
>> ds.ds_Days = 300; ds.ds_Hour = 0; ds.ds_Tick = 0;
>> SetFileDate(target_file, &ds);
>>
>> But no matter what I do the written file has the current date and time.
>> Any ideas why this may be failing.
>>
>
> My mistake, I typoed on the SetFileDate() function, you need to pass the
> address of the DateStamp structure. Although the code you've given as an
> example, should work.

Thanks for doing this. Your code worked but when I used it in my program it
still failed. Turns out that SetFileDate doesn't work if the file is open.
I had something like

Open from
Open to
Copy (from, to)
if (do_clone) SetFileDate()
Close to
Close From

I moved the Close to code to before the SetFileDate and now it works.
Thanks for the help.

Jack



E-Mail: jyork@twmi.rr.com
Alt: jyork@voyager,net
Home: http://my.voyager.net/~jyork

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/