Need Help Making a .BAT File

Discussion in 'Software' started by matrixtna, Jan 25, 2005.

  1. matrixtna

    matrixtna Private E-2

    HI

    I want to make a BAt file that creates a certain shortcut and then moves it into a certain folder (NOTE Moves it NOT COPIES IT)

    Any idea on how to do this ???

    (i know how to produce a Batch file i just cant figure out what commands to do for this one)

    Thanks
     
  2. BrokenArrows

    BrokenArrows Sergeant

    I dont think its possible to create a shortcut with a batch file. Since a shortcut is for use in a GUI environment it does not have much place in the command line world.

    As for moving a file you cant just move it. You have to copy the file to the desired location and then delete the original.

    eg.

    copy filename.txt c:\newfolder\newfile.txt
    del filename.txt

    this will have the same effect as moving it.

    You can however launch a shortcut from an msdos window. The command is:
    start myfolder.lnk
     
  3. matrixtna

    matrixtna Private E-2

    Sagem if i wanted to copy a file to another location and not delete the original one, i just wouldnt use the del file.txt command right?
     
  4. BrokenArrows

    BrokenArrows Sergeant

    matrixtna sorry about the delay i forgot about this post.
    Yes all you have to do is leave out the del filename bit.

    Hope this helps
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds