| 
	
		| Subject | Re: USE A STRING AS A FILE  NAME |  
		| From | ED FURCHE <ED@UNIV-COMPUTERS.COM> |  
		| Date | Sat, 25 Jun 2022 12:00:44 -0400 |  
		| Newsgroups | dbase.getting-started |  | 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
 
 
 |  |