Create Batch File

Discussion in 'other software & services' started by Dazed_and_Confused, Jun 5, 2004.

Thread Status:
Not open for further replies.
  1. Dazed_and_Confused

    Dazed_and_Confused Registered Member

    Joined:
    Mar 4, 2004
    Posts:
    1,831
    Location:
    USA
    It's been a while since I've done this type of "programming", so can someone tell me how I can (if it's possible using XP Home) to create a simple batch file that will automatically copy a file from one directory to another?
     
  2. snowbound

    snowbound Retired Moderator

    Joined:
    Feb 18, 2003
    Posts:
    8,723
    Location:
    The Big Smoke
    Hi D&C :)

    I moved your thread to a more appropriate forum.

    It will get more attention over here. ;)


    snowbound
     
  3. Bubba

    Bubba Updates Team

    Joined:
    Apr 15, 2002
    Posts:
    11,271
    You may have to supply more specifics but below is a straight forward batch file that was placed in the Root directory. The file was icq.ico and I wanted it copied to the c:\yb\temp folder.

    Code:
    cd\yb
    copy icq.ico c:\yb\temp
    
    cd= change directory
    yb= name of directory
     
  4. Dazed_and_Confused

    Dazed_and_Confused Registered Member

    Joined:
    Mar 4, 2004
    Posts:
    1,831
    Location:
    USA
    Thanks, Bubba. I am familar with DOS commands. I just don't understand were to enter these commands? A simple text file saved with a .bat extension?
     
  5. Bubba

    Bubba Updates Team

    Joined:
    Apr 15, 2002
    Posts:
    11,271
    Exactly....and I'm sorry I assumed wrongly that part was understood :(
     
  6. Dazed_and_Confused

    Dazed_and_Confused Registered Member

    Joined:
    Mar 4, 2004
    Posts:
    1,831
    Location:
    USA
    That's alright, Bubba. Your failure to mention it made me correctly assume it was something as straightforward as a text file. Thanks again!;)
     
  7. MCT

    MCT Registered Member

    Joined:
    Mar 10, 2004
    Posts:
    300
    also,

    xcopy "%userprofile%\Desktop\MSN.ICO" "%userprofile%\Start Menu\Programs\Msn.ico" /Y

    that will copy an icon (msn.ico) from the desktop, 2 the start menu > programs and wont ask for any confirmation 2 overwrite

    that doesnt have 2 be in the same directory as whatever u are wanting 2 copy, just a different alternative

    Edit: goto start > run > type cmd > then xcopy /? will give a list of switches

    Regards :)
     
  8. Dazed_and_Confused

    Dazed_and_Confused Registered Member

    Joined:
    Mar 4, 2004
    Posts:
    1,831
    Location:
    USA
    One more question, Bubba / MCT. Is there a referece for DOS commands anywhere on my XP Home PC?

    Edit: Sorry, MCT. I sent my original message before I read your post. THanks!
     
  9. MCT

    MCT Registered Member

    Joined:
    Mar 10, 2004
    Posts:
    300
  10. Dazed_and_Confused

    Dazed_and_Confused Registered Member

    Joined:
    Mar 4, 2004
    Posts:
    1,831
    Location:
    USA
    Exactly what I needed MCT. My batch file is working great, too. I've made one to do some routine PC maintenance. Now if there was only a way to zip a file using DOS commands.... :D
     
  11. MCT

    MCT Registered Member

    Joined:
    Mar 10, 2004
    Posts:
    300
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.