Results 1 to 11 of 11

Thread: Daily Backups

  1. #1
    Star Lounger
    Join Date
    Jul 2003
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Daily Backups

    <img src=/S/jollyroger.gif border=0 alt=jollyroger width=29 height=18>

    Hi there. I have an NT 4.0 machine on a network that runs some CAD based measurment software. Our IT department refuses to share out the hard drive so every so often I have to manually copy programs to the network, so that I can access them from my desk. This is a pain, and programers will update these measurment programs regularly, so I am never positive that I have the latest version. There are also hundreds of these programs so the transfer takes about a half hour, I therfore only get around to doing it every few weeks.

    I need a solution. I would rather not have to purchase any software, but I don't know how to or where to start with writing a script. I would love to have a file transfer occur automatically during off hours. Any idea's? Is a software purchase my only option?

    Thanks, Keith

  2. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Daily Backups

    How about scheduling a BATch file to do the copying?
    (I assume you want a (usable) copy than a (possibly compressed) backup file?)

  3. #3
    Star Lounger
    Join Date
    Jul 2003
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Daily Backups

    <img src=/S/jollyroger.gif border=0 alt=jollyroger width=29 height=18>

    Yes and yes. How do I go about creating a BATch file? I have a little programing experience, I just don't know where to start.

  4. #4
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Daily Backups

    OK. A BATch file is basically a command line prompt - or sequence of them - which you can 'run'.

    Let us assume the files you want to copy are on mapped drive "M", in a folder named "Files" and you want to make copies of all .doc files.
    You want to copy them to "F:files"

    Open up a text editor such as Notepad and enter:<pre>copy /y m:files*.doc F:files</pre>

    Save this as (eg)
    c:doccopy.bat
    (You may need to change the file save-as type to prevent it being saved with a .txt extension)
    The /y switch suppresses prompting to overwrite if you are copying files with the same name.

    Find doccopy.bat in Explorer and double-click it to run it, or from Start > Run enter "c:doccopy.bat" (without the quotation marks) and hit return.

    If this works, you will need to set up a scheduled task to run it at a suitable time. Post back if you need help on the scheduling - I recall a nifty utility that would set it all up for you on NT and will dig it out if nec - or any clarification. You could practice with dummy files and locations (that do exist!) if you want to check it all works before going live.

  5. #5
    Star Lounger
    Join Date
    Jul 2003
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Daily Backups

    <img src=/S/jollyroger.gif border=0 alt=jollyroger width=29 height=18>

    OK here's my file:

    rem ***This BATch file copys PCDMIS cmm programs to the network***

    @Echo Off
    copy /y c:PCdmisw*.PRG L:PrgXferbackup
    copy /y c:PCdmisw*.CAD L:PrgXferbackup

    I saved it as ProgCopy.bat and it works on my 2Kpro machine. When I go to run it on the NT box, the dos widows flashes for a second, then disappears without any file transfer. I have double and triple checked the paths. Any reason why it won't run on NT? are there permissions I don't know about? And about that scheduler thing - I can't seem to find the Task Scheduler and the info on the web I've found assumes too much. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

    Thanks! Keith

  6. #6
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Daily Backups

    What happens if you manually type them in from the Command Prompt one line at a time?
    (Running the batch file may close the window before you have a chance to see any error message.)

    BTW - I suspect you may not need the /y switch when running the instruction through a batch file.

    And with a bit of luck, Mr John "Batchman" Gray may be reading this and lend a hand... <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  7. #7
    Star Lounger
    Join Date
    Jul 2003
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Daily Backups

    <img src=/S/jollyroger.gif border=0 alt=jollyroger width=29 height=18>

    OK! removing /y did it. And I found Task Scheduler and set it up to run.

    John and Leif, thanks for your help!

  8. #8
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Daily Backups

    Yes, Leif is right - there's no /y switch on NT4's COPY command!

    Stick PAUSE as the final statement in the BATch file and you'll see the error message.

    Depending upon which version of IE you have, you will have in your Services either one called Schedule (old versions) or Task Scheduler (new versions). Have a look at the machine you'll be running this on, and see what you've got. It is fairly easy to get a scheduled job to work -- and even easier to get it NOT to work! Are your machines part of a domain? If so, do you have access to a "service account", or at least one whose password does not expire? We'll take this further when I have a better idea of your environment.

    If you have access to either the NT4 Resource Kit(s) or the Windows 2000 Resource Kit(s), or can filch the one from the Windows XP Resource Kit (which comes from the 2003 Server Resource Kit Tools (12 MB)...!), I would suggest you consider the utility called ROBOCOPY, which has (among other things) the ability to make an identical copy ("mirror") of a target directory from a source directory. Just like any other COPY-type utility, you may say, but it's rather cleverer than that, because it will only copy NEW or CHANGED files from the source directory to the target directory, and delete files from the target directory which are no longer in the source. The advantage of this is the reduction in the amount of copying, if the source directory doesn't change too much AND that you end up with a target directory which is identical to the source directory. Of course if nearly everything changes then you have to copy nearly everything!

    And PS to Leif - it's BATman!
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Daily Backups

    Time for a new userpic?
    Attached Images Attached Images

  10. #10
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Daily Backups

    Hans

    Thanks for the Batman userpic, which I've saved. But for the amount of attention the NT forum gets, and the subset of this which would be BATch files, I think I'll just stay cool, hunky and handsome as you see to the left!
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Daily Backups

    OK, fine with me. You might change your username from JohnGray to JohnHunk then <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •