Solved

Back Up Program

Posted on 2001-08-01
10
174 Views
Last Modified: 2010-05-02
Hi, I'm about to start writing a program that will backup files and programs (I.E Databases etc). I will require this program to be able to backup programs over the network. Is this possible and would it require a lot of work ? I would also require it to zip certain files aswell.

Thanks

P.S As I get more help, I will increase the points.
0
Comment
Question by:choccarlm
10 Comments
 
LVL 1

Expert Comment

by:Minuteman
ID: 6339731
You can do a lot of file manipulation with the FileSystemObject in the Scripting library (SCRRUN.DLL):

Dim fso as New FileSystemObject
Dim fdrWork as Folder
Dim fdrBackup as Folder
Dim fil as File

Set fdrWork = fso.GetFolder("C:\MyWork")
Set fdrBackup = fso.GetFolder("C:\Backup")

For Each fil in fdrWork
  fil.Copy fdrBackup.Path
Next
0
 
LVL 4

Expert Comment

by:WolfgangKoenig
ID: 6339778
When your file system have an network connection to other sources etstablish you can copy and move files simply using the VBA.Filesystem Object.

For instance methods are:

ChDir
ChDrive
CurDir
...
Dir
FileCopy
...
Kill
RmDir
SetAttr

You can access these functions simply in VA.
Zipping is provided by:

Steve McMahon (steve@vbaccelerator.com)
Requires: Info-ZIP's Zip32.DLL v2.32
Visit vbAccelerator - advanced free source code for VB programmers http://vbaccelerator.com


Best regards
WoK

0
 

Author Comment

by:choccarlm
ID: 6339911
Forget the part about requiring it to backup over the network. That isnt necessary any more. Ideally, I will just require it to zip chosen files.

Thanks
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 4

Expert Comment

by:WolfgangKoenig
ID: 6340222
For VB zipping example see at http://vbaccelerator.com
(Third section ..)

WoK
0
 
LVL 4

Expert Comment

by:WolfgangKoenig
ID: 6340226
Exactly at:
http://vbaccelerator.com/overview.htm
(Third section ..)
0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6340408
Hi!

Here's something for you:

View page/code...
http://www.planetsourcecode.com/xq/ASP/txtCodeId.14063/lngWId.1/qx/vb/scripts/ShowCode.htm

Description: Simple code to zip/unzip with Winzip

That's it!

glass cookie : )
0
 
LVL 8

Accepted Solution

by:
glass_cookie earned 150 total points
ID: 6340443
OK, some more compression stuff:

 
Download...
http://www.planetsourcecode.com/upload/ftp/CODE_UPLOAD13332132001.zip

Description: A powerful and very quick compression program using the 32bit zlib.dll (V1.1.3) compression library originally written by Jean-loup Gailly and Mark Adler (variation of LZ77 Lempel-Ziv 1977 algoritm). The application is implemented through an extensive ArielZip class and a Winzip like client interface. Features * Powerful and very fast - compresses 6000 kb data files to 1500 kb (25%) in 2.1 seconds! * Multiple disk spanning with automatic sensing of disk capacity * User friendly floppy disk change dialogue showing contents of disk to be overwritten * Single and multiple file extraction * Extracted icons included in archive as bitmaps * 9 compression levels * Add folders and subfolders through recursive scanning of FSO objects * Add files with multiple file selection * Delete files from list and archive * Refresh files * File association of .azp extension with default icon using regobj.dll (included in zip file). Other Programming Features - About box referencing application object (revision etc) - Custom Folder browse control implementing BrowseForFolder (ArielBrowseControl) - Extensive use of FileSystemObject (requires scripting runtime dll) - Automatic sensing of floppy disk insertion/removal - Demonstration of toolbar control - Small icon extraction using SHGetFileInfo calls in shell32.dll lib - Extensive usage of CopyMem (Kernel32) - Access the system temp folder through GetTempPath (kernel32) - Registering of azp file type and associated default icon through regobj.dll - Ini file manipulation using GetProfile and SaveProfile functions Credits and links: see readme.txt file
 
AND

Download...
http://www.planetsourcecode.com/upload/ftp/CODE_UPLOAD141301242001.zip

View page for declarations:
http://www.planetsourcecode.com/xq/ASP/txtCodeId.14684/lngWId.1/qx/vb/scripts/ShowCode.htm

Description: Compression and decompression using the best public available compression library: bzip2 It uses the Libbz2.dll which is included in the zip file. More info about bzip2: http://sourceware.cygnus.com/bzip2/

That's it!

glass cookie ; )
0
 

Expert Comment

by:vibale
ID: 6343785
Where can I get "Ariel System Browse Controls" From . The one needed is (Ariel Browse Ctrl.oxc).

Thanks
0
 
LVL 3

Expert Comment

by:modder
ID: 6536211
choccarlm

Please finalise this question, even if nobody gave you a satisfactory answer - in that case just let me know and I will be happy to refund your points to you.

If someone did give you a satisfactory answer, please accept the comment as the answer. If you are having problems doing that let me know.

Please do *not* ignore this request. To the other participants in the thread - if no response is forthcoming alert me and I will take action.

Regards

modder
Community Support Admin
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question