Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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!

  • Community Leader
  • 26,047 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