Batch/CMD: Pass Parameters containing Spaces
Question by Guest | 2014-06-10 at 16:58
I would like to pass a file path to one of my applications via the command line (later I want to use a batch script for this).
Unfortunately, this is only working when the path does not contain any spaces or blanks.
What can I do to be able to pass a parameter even if it contains a space?
Related Topics
Delphi/Lazarus: Command Line Parameter Tutorial Part 1: Sending
Tutorial | 0 Comments
Delphi/Lazarus: Command Line Parameter Tutorial Part 2: Receiving
Tutorial | 0 Comments
PHP: Remove arbitrary Characters at the Beginning and the End of a String
Tutorial | 0 Comments
HTML: No line break between particular words
Tip | 0 Comments
Windows Batch Script: Computer Shutdown
Tutorial | 0 Comments
Windows: Maximum Parameter Length for Command Prompt or Batch-Script
Question | 1 Answer
Delphi: Execute external Program and pass Parameters
Tip | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
Usually, spaces are used to divide the single parameters from each other. For example, when passing
to the program prog.exe, the application would receive two parameters. That is "C:\Folder" as the first parameter and "A\File.txt" as the second parameter.
You have to surround the parameters containing spaces with quotation marks. This makes them to be recognized as only one individual parameter.
2014-06-10 at 19:37