Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy file
Message
De
06/04/2001 11:24:33
 
 
À
06/04/2001 11:11:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00492830
Message ID:
00492846
Vues:
19
>***
>*
>* BorderoPath(, )
>*
>* function copyeleList copies the files from 1 directory to another
>*
>* txtFileName
>* the name of the text file
>*
>* newdir
>* the path where to put the file
>* Return:
>*
>*
>*
>function copyeleList
>
>parameter txtFileName, newdir,isMacro
>local lctextFile, lcNumOfEle, lcFiletoCopy, newdir2,lcstring,lnBCopy
>
>lnBCopy = 0
>lctextFile = FILETOSTR(txtFileName)
>lcNumOfEle = alines(txtTOarray, lctextFile, .t.)
>for i = 1 to lcNumOfEle
> lcFiletoCopy = txtTOarray[i]
> newdir2 =substr(lcFiletoCopy, rat("\",lcFiletoCopy))
> newdir2 = newdir + newdir2
> if FILE(lcFiletoCopy)
> *if file does exists
> COPY FILE (lcFiletoCopy) to (newdir2)
> lnBCopy = lnBCopy + 1
> else
> *if file doesn't exists Use GetMess
> if !isMacro
> endif
> endif
>
>endfor
>return lnBCopy
*
* BorderoPath(, )
*
* function copyeleList copies the files from 1 directory to another
*
* txtFileName
* the name of the text file
*
* newdir
* the path where to put the file
* Return:
*
*
*
Function copyeleList

Parameter txtFileName, newdir,isMacro
Local lctextFile, lcNumOfEle, lcFiletoCopy, newdir2,lcstring,lnBCopy

lnBCopy = 0
lcNumOfEle = adir(aFiles, "*.*")
For i = 1 to lcNumOfEle
     lcFiletoCopy = aFiles[i]
     newdir2 =substr(lcFiletoCopy, rat("\",lcFiletoCopy))
     newdir2 = newdir + newdir2
     If FILE(lcFiletoCopy)
*if file does exists
          Copy FILE (lcFiletoCopy) to (newdir2)
          lnBCopy = lnBCopy + 1
     Else
*if file doesn't exists Use GetMess
          If !isMacro
          Endif
     Endif

Endfor
Return lnBCopy
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform