CW2.003 Copy file changes file date 
Author Message
 CW2.003 Copy file changes file date


                       - - - - - - - - - -            
Hi All:

I previously posted this message and did not get any responses so will post
again:

I need to find a way to copy files inside CW without having the file date
changed. The problem is when we need to copy DLL files or EXE files if the
date changes we can't properly track the revision. So is there a way to use
maybe API calls (if so does someone have a prototype?) or something else?

Thanks in Advance!

Best Regards,
CT
-------------
Home: http://www.*-*-*.com/ ~chaostc/

"Let the one without sin try to survive!"



Mon, 20 Mar 2000 03:00:00 GMT  
 CW2.003 Copy file changes file date


                       - - - - - - - - - -            
Hi CT,


Quote:
>I need to find a way to copy files inside CW without having the file date
>changed. The problem is when we need to copy DLL files or EXE files if the
>date changes we can't properly track the revision. So is there a way to use
>maybe API calls (if so does someone have a prototype?) or something else?

CopyFileA in 32 bits:

CopyFileA(*LPCSTR,*LPCSTR,BOOL),BOOL,Pascal,RAW

Don't know what can be used in 16 bits.  If I remember correctly then
the boolean variable is set to true to overwrite files, and false to
NOT overwrite files.  To get what error codes may be reported use the
GetLastError() api call:

GetLastError(),DWORD,PASCAL

This returns the last errorcode and it should be called immediately
after the CopyFileA function.  If you like I can send you a complete
list of the Win95 system error codes.

Best regards,

Arnor Baldvinsson
Allerup Edb
Tel: +45 4675 7122
Fax: +45 4675 7144
Denmark


http://www.icetips.com
UIN nr.: 2428601



Mon, 20 Mar 2000 03:00:00 GMT  
 CW2.003 Copy file changes file date


                       - - - - - - - - - -            
This is a cryptographically signed message in MIME format.

--------------msB16B4C0C35721FF018E9E2B0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Is there a way to make a Global Variable in the main template with the time and
date of the compile that you could put into a about window.
I know the main template has a Programer field but I have never tried to access
it from a program.

Quote:


>                        - - - - - - - - - -

> >I need to find a way to copy files inside CW without having the file date
> changed. The problem is when we need to copy DLL files or EXE files if the
> date changes we can't properly track the revision. So is there a way to use
> maybe API calls (if so does someone have a prototype?) or something else?
> <

> Why not just stamp your exe's & dlls with a version no.

> HTH

> Sean Gates

--------------msB16B4C0C35721FF018E9E2B0
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

<encoded_portion_removed>
--------------msB16B4C0C35721FF018E9E2B0--



Tue, 21 Mar 2000 03:00:00 GMT  
 CW2.003 Copy file changes file date


                       - - - - - - - - - -            
This is a cryptographically signed message in MIME format.

--------------msB16B4C0C35721FF018E9E2B0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Is there a way to make a Global Variable in the main template with the time and
date of the compile that you could put into a about window.
I know the main template has a Programer field but I have never tried to access
it from a program.

Quote:


>                        - - - - - - - - - -

> >I need to find a way to copy files inside CW without having the file date
> changed. The problem is when we need to copy DLL files or EXE files if the
> date changes we can't properly track the revision. So is there a way to use
> maybe API calls (if so does someone have a prototype?) or something else?
> <

> Why not just stamp your exe's & dlls with a version no.

> HTH

> Sean Gates

--------------msB16B4C0C35721FF018E9E2B0
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

<encoded_portion_removed>
--------------msB16B4C0C35721FF018E9E2B0--



Tue, 21 Mar 2000 03:00:00 GMT  
 CW2.003 Copy file changes file date


                       - - - - - - - - - -            

Quote:
>I need to find a way to copy files inside CW without having the file date

changed. The problem is when we need to copy DLL files or EXE files if the
date changes we can't properly track the revision. So is there a way to use
maybe API calls (if so does someone have a prototype?) or something else?
<

Why not just stamp your exe's & dlls with a version no.

HTH

Sean Gates



Tue, 21 Mar 2000 03:00:00 GMT  
 CW2.003 Copy file changes file date


Quote:


>                       - - - - - - - - - -            
>This is a cryptographically signed message in MIME format.

>--------------msB16B4C0C35721FF018E9E2B0
>Content-Type: application/x-pkcs7-signature; name="smime.p7s"
>Content-Transfer-Encoding: base64
>Content-Disposition: attachment; filename="smime.p7s"
>Content-Description: S/MIME Cryptographic Signature

The 4000+ characters of garbage data deleted . . .

Quote:
>This is a cryptographically signed message in MIME format.

Exactly what is this {*filter*}(cryptographically signed message in MIME format)
that people keep spamming the internet with.

Does anybody else care about the wasted bandwidth for this stuff?

Lots of sites still pay for connect time to download this garbage.

--
Michael J. Kuhn  Computer Systems Consultant  phone:410-254-7060


       c/o Baltimore Rh Typing Laboratory, Inc.  phone:410-225-9595



Tue, 21 Mar 2000 03:00:00 GMT  
 CW2.003 Copy file changes file date

Hello Doug!

 A quick look at CW help did reveal those template symbol

%ProgramDateCreated
%ProgramDateChanged
%ProgramTimeCreated
%ProgramTimeChanged

It sounds like those can be used to do what you want!



Quote:
> Is there a way to make a Global Variable in the main template with the
time and
> date of the compile that you could put into a about window.
> I know the main template has a Programer field but I have never tried to
access
> it from a program.



> >                        - - - - - - - - - -

> > >I need to find a way to copy files inside CW without having the file
date
> > changed. The problem is when we need to copy DLL files or EXE files if
the
> > date changes we can't properly track the revision. So is there a way to
use
> > maybe API calls (if so does someone have a prototype?) or something
else?
> > <

> > Why not just stamp your exe's & dlls with a version no.

> > HTH

> > Sean Gates



Wed, 22 Mar 2000 03:00:00 GMT  
 CW2.003 Copy file changes file date


                       - - - - - - - - - -            
Hi,


Quote:
>Is there a way to make a Global Variable in the main template with the time and
>date of the compile that you could put into a about window.
>I know the main template has a Programer field but I have never tried to access
>it from a program.

Think it should, but I tend to think that it might enforce full
compile of the entire app every time...  I'll check it out tomorrow:)

Best regards,

Arnor Baldvinsson
Allerup Edb
Tel: +45 4675 7122
Fax: +45 4675 7144
Denmark


http://www.icetips.com
UIN nr.: 2428601



Wed, 22 Mar 2000 03:00:00 GMT  
 CW2.003 Copy file changes file date


Quote:
>I previously posted this message and did not get any responses so will post
>again:

>I need to find a way to copy files inside CW without having the file date
>changed. The problem is when we need to copy DLL files or EXE files if the
>date changes we can't properly track the revision. So is there a way to use
>maybe API calls (if so does someone have a prototype?) or something else?

Arnor posted this recently, he may also have a solution for 16 bit?

I have solved all my copying and file management problems by using the
following API calls (in 32bit only)

CopyFileA
GetLastError
FormatMessageA
GetDriveTypeA
GetVolumeInformationA

I had to move my application to 32bit to get access to some of these
functions, but it was very much worth it!  All the 32bit API
prototypes and information along with example code snippets can be
found (for free!) at the Microsoft MSDN site after you have
registered.

No need for the CW Copy command which will reset the date/time stamps
of the copied files (absolutely unacceptable in my case) or running
dos commands leaving windows unclosed here and there;)  The
GetVolumeInformationA will retrieve volume label, serial number, FAT
type and some other valuable information and GetLastError will get the
last error posted by the active thread and if placed right after the
CopyFileA call it will retrive any error codes posted by the CopyFileA
call.  Then pass the error code to FormatMessageA and you get the
system error message back.  GetDriveTypeA will correctly report the
drive types for ram drives and cd-rom drives, which the 16 bit version
does not.

Best regards,

Arnor Baldvinsson
Allerup Edb
Tel: +45 4675 7122
Fax: +45 4675 7144
Denmark


http://www.icetips.com
UIN nr.: 2428601

ComForMark
Computer services For Marketing
Sydney,  Australia



Wed, 22 Mar 2000 03:00:00 GMT  
 CW2.003 Copy file changes file date


                       - - - - - - - - - -            
Hi Geoff,,

Quote:

>>I need to find a way to copy files inside CW without having the file date
>>changed. The problem is when we need to copy DLL files or EXE files if the
>>date changes we can't properly track the revision. So is there a way to use
>>maybe API calls (if so does someone have a prototype?) or something else?

>Arnor posted this recently, he may also have a solution for 16 bit?

I haven't looked closely at 16 bit api, but there are some functions
in the LZH library in 16 bit api that might work for copying files, as
it will only use the uncompress methods if the original file is
compressed.  I haven't experimented with this and it seems a bit more
involved than 32bit as both files must be opened with LZOpenFile, then
copied with LZCopy and finally both files must be closed with LZClose.
I'm not sure if the files will retain their original date/time stamps
after this.  

Best regards,

Arnor Baldvinsson
Allerup Edb
Tel: +45 4675 7122
Fax: +45 4675 7144
Denmark


http://www.icetips.com
UIN nr.: 2428601



Thu, 23 Mar 2000 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. CW2.003 File copy changes the date.....need a way to copy w/o date change

2. How to copy a Dos file (cw2.003)?

3. Process template and file copy (CW2.003)

4. CW2.003 - Changing file path(s)

5. CW2.003 - file errors on Clarion file - HELP!

6. Can't open .app file any more [cw2.003]

7. File Loaded List Box Performance (CW2.003)

8. CW2.003 Invalid Key file...

9. CW2.003 Report Writer - Using variable for file path/name

10. clipper files CW2.003

11. CW2.003 & Corrupt File

12. CW2.003 - file backup using Process Template

 

 
Powered by phpBB® Forum Software