Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete space in file name

Status
Not open for further replies.

poupou

Programmer
Jun 12, 2002
6
CA
Hi,
I wouild like to save table in file name 'toto' + no
+ '.dbf'

But when I try with:
no = str(89)
copy to 'toto' + no + '.dbf'

I'am able to create file, but is name is
toto 89.dbf

My program put 8 spaces between toto and 89

I try to with
copy to 'toto' + trim(no) + '.dbf'
But it's was the same result

Thanks and sory for my bad english

Redg
 
Redg,
You need to trim the leading spaces, and trim() or rtrim() handle trailing spaces. Use ltrim() or alltrim(). Try:
copy to 'toto' + alltrim(no) + '.dbf'

Rick
 
copy to 'toto' + ALLTRIM(STR(no))+ '.dbf'
Walid Magd
Engwam@Hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top