/** Create folder and copy files **/ - 07-16-2003 , 03:54 PM
Hi, first a piece of code:
&& format a date AAMMDD
rDate = dtoc(DATE())
rDate = substr(rDate, 3, 2)+ substr(rDate, 6, 2)+substr(rDate, 9, 2)
&& create a new folder with the format date
&& copy a file in the new folder
COPY FILE ("c:\temp\database.dbf") to ("c:\temp\"+rDate+"\database.dbf")
Second, here is the problem:
1- a folder with the correct name is create (WORKING)
2- the file is not copied in the new folder (NOT WORKING)
I don't understand why the file does not want to be copied (and no error).
If someone have a idea . . . thanks in advance!
Re: /** Create folder and copy files **/ - 07-17-2003 , 09:03 PM
lbrassard (AT) newlook (DOT) ca (Luc) wrote in message news:<19f162ff.0307161254.559c5027 (AT) posting (DOT) google.com>...
cFilename = "c:\temp\"+rDate+"\database.dbf"
COPY FILE c:\temp\database.dbf TO &cFilename
Obviously, c:\temp\database.dbf cannot be open when you try to copy it
Re: /** Create folder and copy files **/ - 07-21-2003 , 05:20 AM
is in use and you have an active error handler eating the
native Vfp error 3 message?
(In general personally I would not use DTOC() but
DTOS(DATE()) && or SUBSTR( DTOS(DATE()),3 )
to be independent of things like Set Date, Century, Sysformats
Also in general, better use (name expressions) instead of
¯o substitutions if possible.
Would GETENV('temp') help to avoid the hardcoded full-
"Luc" <lbrassard (AT) newlook (DOT) ca> schrieb