Single quotation marks won’t do in that case. You have to add quotation marks around each path and also enclose the whole command in quotation marks:
cmd /C ""C:\Program Files (x86)\WinRar\Rar.exe" a "D:\Hello 2\File.rar" "D:\Hello 2\*.*""
More Related Contents:
- Batch character escaping
- How do I escape ampersands in batch files?
- Escape angle brackets in a Windows command prompt
- Escape percent in bat file
- Special Characters in Batch File
- Escape percent signs in given variables
- Example of delayed expansion in batch file
- How do I run two commands in one line in Windows CMD?
- Batch command date and time in file name
- How do I get the application exit code from a Windows command line?
- Is there any sed like utility for cmd.exe? [closed]
- How to make Unicode charset in cmd.exe by default?
- How to test if a file is a directory in a batch script?
- How to redirect Windows cmd stdout and stderr to a single file?
- How can two text files be read in parallel by a batch file?
- Windows batch script to parse CSV file and output a text file
- Using parameters in batch files at Windows command line
- “rd” exits with errorlevel set to 0 on error when deletion fails, etc
- Curl not recognized as an internal or external command, operable program or batch file
- Why is the FOR /f loop in this batch script evaluating a blank line?
- Create a new cmd.exe window from within another cmd.exe prompt
- How do I minimize the command prompt from my bat file
- Path prefixes \??\ and \\?\
- What would be the Windows batch equivalent for HTML’s input type=”password”?
- Windows console %DATE% Math
- How to read input from console in a batch file?
- Batch goto loses errorlevel
- Out of a git console: how do I execute a batch file and then return to git console?
- UTF-16 to UTF-8 conversion (for scripting in Windows)
- Do you know a similar program for wc (unix word count command) on Windows? [closed]