[DUG] Copying files problem

John Bird johnkbird at paradise.net.nz
Thu Sep 21 09:33:00 NZST 2006


On thinking about it there is no way in a program to alter the programs
working directory to be the destination folder....but I can do that in a
Shellexecute.
 
 

John

-----Original Message-----
From: Rohit Gupta [mailto:rohit at cfl.co.nz] 
Sent: Thursday, 21 September 2006 8:11 a.m.
To: johnkbird at paradise.net.nz; NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Copying files problem


We get this sometimes.  Its as if the app has different access rights to the
user, even on Win2K.  We had an incident (still unresolved) a few days
ago.... Maybe its new windows updates.  One thing to note is that since
Win95 (at least), windows does the following :-

To Copy file from DirA to DirB

1.  Make DirB the current directory
2.  Copy from DirA
3.  Change back to original Current Directory

Sometimes, step 1 fails but there are no errors and it copies the file into
the current directory instead.  And I cant figure out any way to detect this
!!


John Bird wrote: 

I copy program files using a line like:
 
copyfile(Pchar(File1),Pchar(File2),false);
 
Sometimes this fails for no obvious reason (File2 is not in use for
instance), and if I open Windows explorer and copy from there it usually
works, if not if I delete the destination file and then paste works fine.
To my mind this proves it is not a problem with permissions to write into
this folder...
 
File1 is on the server, File2 is local on C drive.
 
any ideas?
 
Background:
This is a neat way of updating programs - updated exe files are loaded into
a central update folder (which is not used except for copying from), and the
startup program copies any updated programs into the local C drive working
folder before any programs are in use.   Works wonderfully except on one
site......I wonder the problem is from not being administrator or something
in the PC setup being locked down....(although I don't know why as Windows
Explorer works) 
 
 

John Bird

email

 john at jbcl.co.nz

 johnkbird at paradise.net.nz

Expert in Beyond Software

Ph land (03)384-4527  mobile (027)484-4528

92 Soleares Ave, Mt Pleasant

Christchurch

Web www.jbcl.co.nz <http://www.jbcl.co.nz/> 



 

-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz] On
Behalf Of Gary T. Benner
Sent: Wednesday, 20 September 2006 5:17 p.m.
To: vss at vss.co.nz
Cc: delphi at delphi.org.nz
Subject: RE: [DUG] Integrating Indy HTTPServer


[Reply] 

HI Jeremy, 

If you are incorporating this into an app, may I suggest you dynamically
instantiate the component each time you make an http call. I found this made
for greater reliability. 

kr 

Gary 

At 13:53 on 20/09/2006 you wrote 

>To : delphi at delphi.org.nz 

>CC : 

>From: Jeremy Coulter, vss at vss.co.nz 

>Content Type: text/html 

>Attached: 

> 

>This is a multi-part message in MIME format. 

> 

> 

> 

> 

>Hi all. 

>List seems to have been VERY quite over the last few days. 

> 

>Has anyone successfully integrated the Indy HTTP Server into an app.? 

>I am going to be adding an HTTP Server into an app. I have and wondered if 

>anyone had used the indy one, and how they found it? 

>Can I use ISAPI or CGI apps. with it does anyone know? 

> 

> 

>Thanks, Jeremy 

> 

>-- 

>No virus found in this outgoing message. 

>Checked by AVG Free Edition. 

>Version: 7.1.405 / Virus Database: 268.12.5/451 - Release Date: 19/09/2006 

> 

> 

> 

>_______________________________________________ 

>Delphi mailing list 

>Delphi at ns3.123.co.nz 

>http://ns3.123.co.nz/mailman/listinfo/delphi 



  _____  


Gary Benner 	
e-Engineer, Lecturer, and Software Developer	

123 Internet  <http://www.123.co.nz> Limited	
Waiariki Institute of  <http://www.waiariki.ac.nz> Technology	
Sunshine Garden Bag  <http://www.sunshinebags.co.nz> Co.	
 <http://www.sommnet.com> MailScanner has detected a possible fraud attempt
from "www.sommnet.com" claiming to be MailScanner has detected a possible
fraud attempt from "www.sommnet.com" claiming to be Sommnet.com Limited	
Mob: 021 966 992	
Email: gary at 123.co.nz 	


Ref#: 41006



__________ NOD32 1.1461 (20060329) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com




  _____  


_______________________________________________

Delphi mailing list

Delphi at ns3.123.co.nz

http://ns3.123.co.nz/mailman/listinfo/delphi

  


-- 

Rohit Gupta
B.E. Elec.   M.E.   Mem IEEE    Associate IEE
Technical Manager
Computer Fanatics Limited
 
Tel     +64 9 4892280
Fax    +64 9 4892290
Email   <mailto:rohit at cfl.co.nz> rohit at cfl.co.nz
Web     <http://www.cfl.co.nz/> www.cfl.co.nz
 
  _____  

This email and any attachments contain information, which is confidential
and may be subject to legal privilege and copyright. If you are not the
intended recipient, you must not use, distribute or copy this email or
attachments. If you have received this in error, please notify us
immediately by return email and then delete this email and any attachments. 


__________ NOD32 1.1461 (20060329) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns3.123.co.nz/pipermail/delphi/attachments/20060921/36cc393e/attachment-0001.html


More information about the Delphi mailing list