Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to concatenate SDF files?
Message
 
 
To
01/10/2002 03:40:26
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00705004
Message ID:
00706319
Views:
45
>Hi Nadya:
>
>I tried what you suggest. Did not get the error message, but nothing got copied either to the MyConCatfile. The files that need to be copied are sdf and MyConCatFile also should be an sdf file. Here is the current code,with minor variations from what Ed suggested to me.
>
>
LOCAL cConCatString, aBWFiles[1,5], nFiles, i
>
>cConCatString = ''
>nFiles = adir(aBWFiles, "c:\BW\Process*.dat")
>
>FOR i = 1 TO nFiles  && this avoids all copies if no files were found
>      cConCatString = cConCatString + FILETOSTR("c:\BW\" + 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
>
>Problem now is that nothing is being copied. Second the MyConCatFile appears as a text file and not an sdf type.
>
>Thanks


First of all, add CHR(13)+CHR(10), e.g.
#define CRLF chr(13)+chr(10)
cConCatString = m.cConCatString + CRLF+FILETOSTR("c:\BW\" + aBWFiles[i,1])

Secondly, the code looks fine and should work, unless you have huge files. Try to examine the files first...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform