Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to concatenate SDF files?
Message
From
01/10/2002 08:28:22
 
 
To
30/09/2002 18:41:59
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00705004
Message ID:
00706298
Views:
52
>I changed aBWFile to aBWFiles in the LOCAL declaration. I also set the path as follows:
>
>
#DEFINE SOURCEPATHNAME = "c:\BW\"  && this is the BW Directory with absolute path
>
>Yet got the "Missing Operand" on the following line:
>
>
nFiles = ADIR(aBWFiles,SOURCEPATHNAME + SOURCEFILEMASK)
Try this instead. It isn't needed in VFP7, but perhaps some earlier version won't allow you to specify a path:
<pre>#DEFINE SOURCEPATHNAME = "c:\BW\"  && this is the BW Directory with absolute path
#DEFINE SOURCEFILEMASK = 'PROCESS*.DAT'
LOCAL cOldPath, nFiles, aFiles[1,5], cConCatString, i
cOldPath = FULLPATH(CURDIR())
CD (SOURCEFILEPATH)
nFiles = ADIR(aBWFiles,SOURCEFILEMASK)
cConCatString = ''
CD (cOldPath)
>
>
>
>>
>>>>
#DEFINE SOURCEFILEMASK = 'PROCESS*.DAT'
>>>>cConCatString = ''
>>>>nFiles = ADIR(aBWFiles,SOURCEPATHNAME + SOURCEFILEMASK)
>>>>FOR i = 1 TO nFiles  && this avoids all copies if no files were found
>>>>   cConCatString = cConCatString + FILETOSTR(SOURCEPATHNAME + aBWFiles[i,1])
>>>>ENDFOR
>>>>=STRTOFILE(cConCatString,'MyConCatFile.DAT',.F.)  && .T. would append to any existing MyConCatFile.DAT found
>>>>RELEASE cConCatString  && releases the large string memory allocation
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform