Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Searching in disk
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01417400
Message ID:
01417415
Vues:
89
I found the program below in your link

But I does not execute form my form button

I supposed I could execute it using pcStartDir and pcFileExt as textobox of my form

Any idea ?

Moises





********************************************************************
* Description.......: GetAllFiles - builds a list of all files in start directory and subdirectories
* Calling Samples...: ?GetAllFiles('\Redp\Appl','SCX')
* Parameter List....: pcStartDir, pcFileExt
* Created by........: Ed Rauh
* Modified by.......: Nadya Nosonovsky 10/18/2000 11:18:39 AM
********************************************************************
* Scripting.FileSystemObject example of recursive file list build - Ed Rauh
lparameters pcStartDir, pcFileExt
* pcStartDir - top directory to start from
* pcFileExt - only files with this extension would be added to the list,
* leave blank for all file extensions

if empty(pcStartDir)
pcStartDir='c:\' && Get list of files in the whole local drive
endif

local ltStartFSO
ltStartFSO = datetime()
private pnTotNumberOfFiles
pnTotNumberOfFiles=0
create cursor filesFSO ( cFilename c(100), nSize n(10), dMod d )
oFSO = createobject('Scripting.FileSystemObject')

=RecurseFolderFSO(oFSO.GetFolder(pcStartDir))
? datetime() - ltStartFSO, pnTotNumberOfFiles

index on nSize tag nSize
browse
****************************************************
function RecurseFolderFSO
lparameter toFolderObject
with toFolderObject
for each oFile in .files
with oFile
if empty(pcFileExt) or justext(.path)==pcFileExt
insert into filesFSO ;
values (.path, .size, .DateLastModified )
pnTotNumberOfFiles=pnTotNumberOfFiles+1
endif
endwith
endfor
for each oSubFolder in .SubFolders
RecurseFolderFSO(oSubFolder)
endfor
endwith
toFolderObject = null
return
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform