Subject |
Re: USE A STRING AS A FILE NAME |
From |
Lee Grant <camilee@nospam.comcast.net> |
Date |
Sat, 25 Jun 2022 19:31:23 -0400 |
Newsgroups |
dbase.getting-started |
Ed,
In the OLH manual, look up Macro. The '&' before a variable indicates
it is a macro to be executed. That's why you created the variable to
hold a string that you wanted created, so that it could be executed in
real time, using a macro is the only way to do what you want, and it
requires the use of macro operator '&'. You need to start at the
beginning of programming with dBASE. :)
Lee
On 6/25/2022 9:06 AM, ED FURCHE wrote:
> ED FURCHE Wrote:
>
>> I WANT TO USE A STRING AS A FILE NAME
>> EXAMPLE STNAME=" 012022.CSV" USED IN A DOS COPY COMMAND
>> I TRIED THIS...
>> !XCOPY @STNAME G:\VISPLUS AND
>> !XCOPY &STNAME G:\VISPLUS AND
>> !XCOPY %STNAME
>>
>> NONE WORKED.....
>
> Why doesn't this work?
> stname="g:\excel\cash012022.csv"
> stname="!XCOPY " + stname + " G:\CASH.CSV"
> !stname
>
|
|