2

Could anyone help me out, I have a batch file find.bat

which has a statement:

findmp %VARIABLE%

what I would like to find out is how to pass a paramater on the batch file

e.g. find.bat /C:\Test

So when called the batch file would execute:

findmp C:\Test

Can this be done in Batch?

1 Answer 1

2

can't be the first parameter?

find.bat c:\test

and inside the bat:

findmp "%1"
Sign up to request clarification or add additional context in comments.

2 Comments

if the name have spaces remember to wrap in "" when calling find.bat "C:\test dir\other"
That is worth being incorporated into the answer. Also "%1" should be either %1 or "%~1".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.