Search through command line arguments.
Posted: 08 Oct 2019 06:54
Hello, I`ve created a batch file where the user can drag and drop a cad file onto it, and it will be translated in to a 3Dpdf.
All of this will be done with a batch file in combination other text files.
But the 3Dpdf translator can also attach other files to (into) the 3Dpdf.
So I intend that the user can drag and drop multiple files on the batch file.
And then I have to search through %1 until however many files where dragged (?).
Firstly I have to find the file with an *.prt extension to define which cad file should be translated (files seem to be ordered alphabetically) and set a variable (e.g. CAD_FILE).
Two files with the *.prt extension are not allowed so I have to give an error if two cad files (*.prt extension) are dragged onto the batch file.
All other files have to be written in to an attachments.txt file with a line break after each file.
I have tried many things but I cannot find a working solution.
I`m thankful for any help or Advice.
Br
All of this will be done with a batch file in combination other text files.
But the 3Dpdf translator can also attach other files to (into) the 3Dpdf.
So I intend that the user can drag and drop multiple files on the batch file.
And then I have to search through %1 until however many files where dragged (?).
Firstly I have to find the file with an *.prt extension to define which cad file should be translated (files seem to be ordered alphabetically) and set a variable (e.g. CAD_FILE).
Two files with the *.prt extension are not allowed so I have to give an error if two cad files (*.prt extension) are dragged onto the batch file.
All other files have to be written in to an attachments.txt file with a line break after each file.
I have tried many things but I cannot find a working solution.
I`m thankful for any help or Advice.
Br