Subject Re: USE A STRING AS A FILE NAME
From Mattia <mattia@nospam.com>
Date Wed, 22 Jun 2022 02:54:36 -0400
Newsgroups dbase.getting-started

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.....

You can create a string with the entire command and then use & operator
str1 = "!XCOPY " + stname + " G:\VISPLUS\"
&str1

Check that correct paths are used
If you want  to check the command use msgbx(str1,"",0)

Mattia