Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Folder Size
Message
De
25/10/2001 08:39:20
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
25/10/2001 04:52:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00573062
Message ID:
00573112
Vues:
19
>Greetings,
> I'm making a backup program in vfp6.0, how or what command can I use to be able to know the size of a folder?
>
>Thanks Ben

I created a program that recurses through folders. The idea was to check where on your hard disk you are wasting disk space.

I don't have the source code right here, now, but I can get it if you are interested. I do have code to recursively delete files (equivalent to del *.bak /s, available on some versions of Windows). You could easily adapt this to your needs.

In the meantime, I have some comments:

  • Recursing through files and folders with VFP is much slower than getting the file size in the explorer. Perhaps 10 times slower. Therefore, better forget about my code (or writing your own, similar), and go for the WSH, or an API function.
  • If you do decide to count file sizes yourself, round the file sizes up the cluster size. Unfortunately, it isn't easy to get trustworthy information about the cluster size for FAT32.
  • If, in a backup, you combine several files into a single file, the cluster size is no longer relevant.

    HTH, Hilmar.
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Précédent
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform