Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to concatenate SDF files?
Message
 
 
À
01/10/2002 03:40:26
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00705004
Message ID:
00706319
Vues:
48
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform