Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Making a .bat file


  • Please log in to reply

#1
LukeMcD

LukeMcD

    Member

  • Member
  • PipPipPip
  • 102 posts
Can someone give me an example of how I would make a bat file that would Move 'FILE 1' from 'FOLDER 1' to 'FOLDER 2', load up 'APPLICATION 1' and then move 'FILE 1' back to 'FOLDER 2' after a few seconds delay?

Thanks!
  • 0

Advertisements


#2
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
xcopy <full path to file1 in folder one> <full path to folder2>
"<full path to application>"
xcopy <full path to file1 in folder2 <full path to folder1> /Y

the first line should copy the file over, the second one should launch the app, then because of the way batch files tend to work the last line won't run untill you close the app that was opened in line2
  • 0

#3
LukeMcD

LukeMcD

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 102 posts

xcopy <full path to file1 in folder one> <full path to folder2>
"<full path to application>"
xcopy <full path to file1 in folder2 <full path to folder1> /Y

the first line should copy the file over, the second one should launch the app, then because of the way batch files tend to work the last line won't run untill you close the app that was opened in line2

Ah fantastic thank you very much! unfortunately For the application to work it needs to load this file up and then remove it from the folder in order to continue, is there a way perhaps a .exe could do this? Although I don't have the software to make .exe's.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP