Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Foldermill passing variables to a .bat file

I am using a program called Foldermill.

Foldermill identifies when a PDF is saved into a folder.

I have setup a rule so that when a PDF is saved into a folder, a .bat file is executed.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

The .bat file should receive the filepath and filename from Foldermill:

enter image description here

However, no parameters are being received by the .bat file:

enter image description here

Is anyone able to help me troubleshoot?

>Solution :

You can think of subroutines as smaller scripts that have been embedded in your main script. They get their own set of parameters, so the %1 and %2 that you have there are actually the parameters that were passed when you ran call :function. Since your code didn’t forward along any of the parameters, your subroutine doesn’t know that they exist.

To get around this, you can forward all of the arguments that were passed to the main script using %*.

call :function %*
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading