user2744190
user2744190

Reputation: 11

Running a batch file from another batch file from shared location

I have a batch file which has series of commands (abc.bat). I need to copy this file into C:\abc\xyz folder and after copying i need to run the abc.bat file from a shared location.

Upvotes: 1

Views: 94

Answers (1)

techturtle
techturtle

Reputation: 2587

The copy command would be the same as if you were typing it directly into a command prompt:

copy abc.bat c:\abc\xyz

Be sure to include the path for the original file location if it isn't in the same location as the current batch file is running from.

To run a batch file from another batch file, you would use the call keyword.

call c:\abc\xyz\abc.bat

Upvotes: 1

Related Questions