AGuyWhoCodes
AGuyWhoCodes

Reputation: 37

What does copy %1 "somefilepathhere" do?

What does copy %1 "Some\Filepath\Here" do in a .bat file?

I understand usually the copy command has two parameters a source and a destination. I don't understand in this specific case tho what is happening with the %1?

Upvotes: 1

Views: 1686

Answers (1)

Phil N DeBlanc
Phil N DeBlanc

Reputation: 398

The %1 represents a command line parameter that is consumed by the batch file. If the name of your batch file is CopyMe.bat, then:

CopyMe SomeFileName.exe

would copy SomeFileName.exe to "Some\Filepath\Here".

Upvotes: 2

Related Questions