Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Making a Batch File (XP/Pro/2002/SP2)

    Can anyone tell me what's wrong with this syntax? Copy C:Access *.* C:AccessBackup I have no experience at making batch files and am trying my hand at it. I've read plenty on the web about it, but this doesn't seem to work for nothing. I did it in Notepad, saving it as Access.bat and then changing the file type to 'All Files'. The encoding is set on ANSI. Any comments?

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    Renton, Washington, USA
    Posts
    12,560
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Re: Making a Batch File (XP/Pro/2002/SP2)

    Add the <font color=red> and delete the space between "access" and the "*"</font color=red>

    C:Access<font color=red></font color=red>*.* C:AccessBackup

    Now running HP Pavilion a6528p, with Win7 64 Bit OS.

  3. #3
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Making a Batch File (XP/Pro/2002/SP2)

    I followed your advice and it didn't work. I just see a 1/2 second flash of a MSDOS window. Do I need to add the full pathname? The full path name is like this: Cocuments and SettingsWeldon SchultzMy DocumentsAccess.

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Making a Batch File (XP/Pro/2002/SP2)

    First, if you are copying anything other than text files, I would recommend using XCOPY rather than COPY. COPY may not copy binary data files correctly.

    Second, yes you need to use the full path, and since the path contains spaces it needs to be in double quotes. Something like:

    <code>
    XCOPY "Cocuments and SettingsWeldon SchultzMy DocumentsAccess*.*" "Cocuments and SettingsWeldon SchultzMy DocumentsAccessBackup"
    </code>
    Legare Coleman

  5. #5
    Uranium Lounger viking33's Avatar
    Join Date
    Jun 2002
    Location
    Cape Cod, Massachusetts, USA
    Posts
    6,308
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Making a Batch File (XP/Pro/2002/SP2)

    Seems like it would be easier to open Win Explorer and highlight the Access folder. Right drag over to a Access Backup folder. Select copy here.
    BOB
    http://lounge.windowssecrets.com/S/flags/USA.gif http://lounge.windowssecrets.com/S/f...sachusetts.gif


    Long ago, there was a time when men cursed and beat on the ground with sticks. It was called witchcraft.
    Today it is called golf!

  6. #6
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Making a Batch File (XP/Pro/2002/SP2)

    I understand that step, and yes it is easier. However I am wanting to make something that I can set up on a schedule to backup nightly for me where I don't have to do it manually.

  7. #7
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Making a Batch File (XP/Pro/2002/SP2)

    Thanks. I tried that and it works!

Posting Permissions

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