Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excluding exe,dll files from shell backup
Message
From
26/11/2016 15:02:21
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Excluding exe,dll files from shell backup
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01643984
Message ID:
01643984
Views:
44
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
Next
Reply
Map
View

Click here to load this message in the networking platform