INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Utility Program

A backup utility code. by ramani
Posted: 18 Oct 03 (Edited 18 Oct 03)

*******************************************
** A simple function to do backup.
*******************************************
** by Subramanian.G (ramani)
**    FoxAcc Software
**    ramani_g@yahoo.com
**    Last modified : 11 October, 2002
** provided as freeware
*******************************************
** You need CabArc tools for the following.
** You can download CabArc tools from...
**  http://support.microsoft.com/default.aspx?scid=kb%3Ben-...
**
** How to use ....
**    lcSource = "c:\myDirectory\*.*"
**    lcDestination = "c:\myBack\myBack1.CAB"
**    =gsCabBack(mySource,myDestination)
*******************************************
** Instead of CAB, you can use WinZips's
** command line utility also, in which case
** change the code 'lcCmd' suitably.
*******************************************
FUNCTION gsCabBack
LPARAMETERS lcSource, lcDestination
LOCAL lcCmd, lnSuccess, loShell
IF !EMPTY(lcDestination) OR !EMPTY(lcSource)
   lcCmd = "CABARC -r -p N " + ;
           lcDestination + SPACE(1) + lcSource
   loShell = CREATEOBJECT("wscript.shell")
   lnSuccess = loShell.Run(lcCmd,1,.t.)  
   IF lnSuccess = 0
      =MESSAGEBOX("BackUp successful.",0+64,"Backup OK!")
   ELSE
      =MESSAGEBOX("BackUp failed",0+16,"Caution")
   ENDIF
ENDIF
*******************************************
** EOF
*******************************************

Back to Microsoft: Visual FoxPro FAQ Index
Back to Microsoft: Visual FoxPro Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close