dbTalk Databases Forums  

renaming a file

comp.databases.paradox comp.databases.paradox


Discuss renaming a file in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ken
 
Posts: n/a

Default renaming a file - 05-17-2008 , 10:48 AM






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="fficerod" +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) hal-pc (DOT) org.

Reply With Quote
  #2  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: renaming a file - 05-17-2008 , 11:26 AM






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="fficerod" +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) hal-pc (DOT) org.

Reply With Quote
  #3  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: renaming a file - 05-17-2008 , 11:26 AM



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="fficerod" +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) hal-pc (DOT) org.

Reply With Quote
  #4  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: renaming a file - 05-17-2008 , 11:26 AM



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="fficerod" +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) hal-pc (DOT) org.

Reply With Quote
  #5  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: renaming a file - 05-17-2008 , 11:26 AM



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="fficerod" +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) hal-pc (DOT) org.

Reply With Quote
  #6  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: renaming a file - 05-17-2008 , 11:26 AM



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="fficerod" +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) hal-pc (DOT) org.

Reply With Quote
  #7  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: renaming a file - 05-17-2008 , 11:26 AM



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="fficerod" +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) hal-pc (DOT) org.

Reply With Quote
  #8  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: renaming a file - 05-17-2008 , 11:26 AM



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="fficerod" +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) hal-pc (DOT) org.

Reply With Quote
  #9  
Old   
Tony McGuire
 
Posts: n/a

Default Re: renaming a file - 05-17-2008 , 11:33 AM




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




Reply With Quote
  #10  
Old   
Tony McGuire
 
Posts: n/a

Default Re: renaming a file - 05-17-2008 , 11:33 AM




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




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.