|
-
May 24th, 2013, 09:20 AM
#1
Thread Starter
New Member
Backup to a USB?
Okay I have been searching google and the internet to find a solution to my problem. Let me start by saying I have no programming training and am teaching myself how to program by reading peoples code and trying to use it where I need it.
What I'm trying to accomplish is our office back's up each individual computer every Friday. The gal that is in charge of distributing the backup's is not computer savvy and doesn't have the time to back up peoples files for them. One coworker who is also the boss is so busy, backing up is on the bottom of his list of things to do. He also has the most important information on his computers that should be backed up. So we can go weeks or months without backing up his computers. What I'm trying to accomplish, if it's possible is to write a code that would either automatically back up the files I need, once the USB is inserted, or it would pop up a dialog box and say back up computer 1 or computer 2? Then you press that button and it would backup the files for that computer. I would like to keep this program on the USB so I don't have to install unnecessary programs on the bosses computers.
I've read several articles that show how to run a autorun program on a USB but now Windows 7 has taken that feature away unless you get a special USB drive. So I'm not sure what my options are I just want something that will be simple for her to use.
Computer 1 is running windows 7 and I tried creating a bat file that would run robocopy to copy the folders I needed but I keep getting an access denied prompt and it wont copy any of them.
Computer 2 is running windows xp and wouldn't recognize the robocopy as a command so I had to write a bat file that was xcopy and that seamed to work well except I couldn't get the Word Documents to copy.
Was wondering if there is a way to program a dialog box to pop up when the USB is inserted and then have the buttons execute the bat files, once they are working properly of course. I would like to have all the data in place so she wouldn't have to browse for what files need to be backed up. I mean we already just copy and paste for our backup so I'm trying to eliminate that so it a one easy step for her and she could walk away and come back to a notification that said completed. Maybe if I could program a progress bar that would be helpful too?
I thought this would be a simple task to write a program that automatically copied files but I was wrong!
Any help would be greatly appreciated.
robocopy.bat
Code:
robocopy "c:\data1" "F:\data1" /e /fft /np /log+:backup_log.txt
robocopy "c:\data2" "F:\data2" /e /fft /np /log+:backup_log.txt
pause
xcopy.bat
Code:
@echo off
echo -------------------
echo Removable Device Automatic Backup
echo -------------------
echo
date /t>>backup_log2.txt
time />>backup_log2.txt
xcopy "c:\file path to copy" "file path of new location" /Y /E /R>>backup_log2.txt
xcopy "c:\file path to copy" "file path of new location" /Y /E /R>>backup_log2.txt
xcopy "c:\file path to copy" "file path of new location" /Y /E /R>>backup_log2.txt
xcopy "c:\file path to copy" "file path of new location" /Y /E /R>>backup_log2.txt
echo Backup Complete!
pause.
I know that this isn't VB code and it was created in a notepad but am hopeful someone out there can help me out or point me in some good directions to learn this.
-
May 24th, 2013, 11:35 AM
#2
Re: Backup to a USB?
unless you get a special USB drive.
Er ... news to me. What exactly would 'special' mean?
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
May 24th, 2013, 02:26 PM
#3
Thread Starter
New Member
Re: Backup to a USB?
 Originally Posted by dunfiddlin
Er ... news to me. What exactly would 'special' mean?
I had read this article...
http://visualdesigning.com/autorun-usb-in-windows7/
What I got from the it was that there are USB's that are partitioned and present as a CD so that an autorun file can be started and then saved data can be put on the second partition?
-
May 24th, 2013, 03:11 PM
#4
Re: Backup to a USB?
Ok. That's not really special but I see where you're coming from.
I would like to keep this program on the USB so I don't have to install unnecessary programs on the bosses computers.
So the first problem I've got is that USB drives really aren't a good option for back-up. They are far too easy to lose, damage, corrupt etc. etc. It makes no sense for the back-up to be less reliable than what it is backing up! The second is that if the program resides on the USB drive then back-up will still depend on somebody remembering that it needs to be done, finding the correct USB stick, inserting it, waiting for completion, and then extracting and storing it safely.
The only safe back-up strategy is automatic, requiring no input or even awareness from the user, on a secure permanent pathway (a network server, a web depository etc.), and at least daily! Far from worrying about having to "to install unnecessary programs on the bosses computers" you should be insisting on the installation of very necessary back-up software as an immediate priority if the data your company handles is in the least bit of value to it!
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
May 25th, 2013, 03:24 AM
#5
Re: Backup to a USB?
As dunfiddlin said, it should be automatic without user intervention. You can use the Windows Scheduler for this so it will automatically back-up the files to a certain location, preferably another location (network, external harddisk, etc).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|