All Forums >> [Scripting] >> Post a VBScript >> Backup Script Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Posts: 5
Score: 0
Joined: 10/10/2006
From: Grand Rapids, MI
Status: offline
Here's a backup script that I wrote that we use to replace the software that comes with Maxtor 100GB OneTouch software. We bought a bunch of these external USB hard drives for laptop user backup solutions, but the software that comes with them... well it sucks. It won't even configure on our new Acer laptops.
Anyway, this script backs up a user's data to an external drive:
1) Checks the existence of a drive E to be used as the backup drive 2) Checks how much space is required for a backup and compares it to the free space on the backup drive 3) If there is enough space, it'll backup the users Desktop, My Documents, Favorites & Outlook folders 4) If there ISN'T enough space, it finds the oldest backup folder and deletes it to make room.
Enjoy!
BTW, I just noticed that all of my indentation is gone from my script. Is there a way to post a script with indents in place?
EDIT(EBGREEN): I don't know why it lost your indentation, but I put it back in for you.
Thanks, Ebgreen, for added the tabs. I'll try several different ways to copy / paste my next script to maintain indents, its so much easier to read IF and For/Next statements.
< Message edited by FatFingerTony -- 10/13/2006 4:28:01 AM >
Posts: 125
Score: 2
Joined: 7/13/2006
From: Australia
Status: offline
I imagine the administrators know about it or someone else has mentioned it but I see your point, tabs don't paste across but they show up as a single space http://www.visualbasicscript.com/m_38613/mpage_1/key_/tm.htm#38614 But it looks like previewing a post will remove one leading blank space.
I tend to write flat code anyway so I can live with it.
Just been looking at this, and it looks great. However when i tried it on my PC is comes up with an error message.
PATH NOT FOUND (Line 31, Char2)
Any ideas? Also when it does work, does it just back the current logged on users stuff or does it go through all the profiles on the machine? As i need it to do all profiles.