Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excluding exe,dll files from shell backup
Message
De
26/11/2016 15:02:21
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Excluding exe,dll files from shell backup
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01643984
Message ID:
01643984
Vues:
45
Windows application folder contains subfolders. Application current directory is in subfolder.
Some folders condain files with dll, chm, exe extensions.

Code below is used to create backup copy. It adds dll, exe and chm files also to backup.

How to exclude exe,dll,cdx,tbk files from backup file?
    loShell  = CREATEOBJECT("shell.application")
    * Backup files and subdirectories in une level up
    lcdir = FULLPATH('..\')
    
    loFolder = loShell.NameSpace(lcdir ).Items
    lcZipFile = 'c:\backups\mybackup.zip'
    
    * Create empty zip file
    STRTOFILE(CHR(80)+CHR(75)+CHR(5)+CHR(6)+REPLICATE(CHR(0), 18), lcZipFile, 0)
    loShell.NameSpace(lcZipFile).copyHere(loFolder)
Andrus
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform