| Computers Forum Index » Computer - Databases - Paradox » renaming a file... |
|
Page 1 of 1 |
|
| Author |
Message |
| ken... |
Posted: Sat May 17, 2008 8:48 pm |
|
|
|
Guest
|
After I export a db file to a text file, I tried to rename it as a
unique file. Since this process is going to happen every month, I would
like to place the renaming process in a script. The script works until I
try to rename it. The following is in the script.
prod_file=":office:prod" +month(today())+".xls")
if not rename("office:tmp_file.xls",prod_file) then
errorshow()
endif
The error message states :
error in rename procedure, unknown table type
What am I doing wrong.
you may e-mail me at :
whoknows at (no spam) hal-pc.org. |
|
|
| Back to top |
|
|
|
| Dennis Santoro... |
Posted: Sat May 17, 2008 9:26 pm |
|
|
|
Guest
|
Try fixing the missing colon on the alias in the if line.
Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and
non-profits since 1982
ken wrote:
Quote: After I export a db file to a text file, I tried to rename it as a
unique file. Since this process is going to happen every month, I would
like to place the renaming process in a script. The script works until I
try to rename it. The following is in the script.
prod_file=":office:prod" +month(today())+".xls")
if not rename("office:tmp_file.xls",prod_file) then
errorshow()
endif
The error message states :
error in rename procedure, unknown table type
What am I doing wrong.
you may e-mail me at :
whoknows at (no spam) hal-pc.org. |
|
|
| Back to top |
|
|
|
| Tony McGuire... |
Posted: Sat May 17, 2008 9:33 pm |
|
|
|
Guest
|
Quote: The error message states :
error in rename procedure, unknown table type
What am I doing wrong.
Look at HELP on rename.
You need to use a filesystem type to rename. And you need to
findfirst() on it, I believe.
That is in addition to the colon for alias that Dennis mentioned.
Something like:
stFile="drive:\\path\\subpath\\currentname.xls"
stNewFile="drive:\\path\\subpath\\newname.xls"
if fs.findfirst(stFile) then
fs.rename(stFile,stNewFile)
endif
Although you may have to have the files in the :work: directory and
may not be able to specify path. Try it and see, and let us know your
results if you would.
Don't expect direct e-mail responses. You need to visit here and
retrieve any responses. Not to mention that you are likely signing up
to be SPAMmed by posting a real e-mail address in the clear as you
have.
--
------------------------------
Tony McGuire |
|
|
| Back to top |
|
|
|
| marco... |
Posted: Mon May 26, 2008 10:10 pm |
|
|
|
Guest
|
beside the other answers i would use string(month(today())
bye
marco
ken wrote:
Quote: After I export a db file to a text file, I tried to rename it as a
unique file. Since this process is going to happen every month, I would
like to place the renaming process in a script. The script works until I
try to rename it. The following is in the script.
prod_file=":office:prod" +month(today())+".xls")
if not rename("office:tmp_file.xls",prod_file) then
errorshow()
endif
The error message states :
error in rename procedure, unknown table type
What am I doing wrong.
you may e-mail me at :
whoknows at (no spam) hal-pc.org. |
|
|
| Back to top |
|
|
|
|