Subject |
Re: USE A STRING AS A FILE NAME |
From |
Mattia <mattia@nospam.com> |
Date |
Mon, 27 Jun 2022 02:31:24 -0400 |
Newsgroups |
dbase.getting-started |
ED FURCHE Wrote:
> Mattia 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.....
> >
> > 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
> >
> this worked...
> !erase g:\excel\cash.csv
> stname = "g:\excel\cash012022.csv"
> str1 = "!XCOPY " + stname + " G:\excel\cash.csv"
> &str1
glad to hear that
Mattia
|
|