Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7869731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:25:02+00:00 2026-06-03T01:25:02+00:00

I am attempting to pass command line arguments to a console application(Computer Language Compiler).

  • 0

I am attempting to pass command line arguments to a console application(Computer Language Compiler).

My Problem: The argument I am passing contains a hyphen character and it is causing an error “- was unexpected command/character”.

This is the command line argument I am using(12d.exe is the application/compiler):

12d.exe "C:/Staff - Name/abc.4dm"

It seems that its looking at the ‘-‘ as a command and not part of a directory/string. Maybe I can use a batch file to perform this command line and reformat the directory path? You know how like in HTTP POST I can use urlencode to format post commands, maybe I can encode the command line in a batch file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:25:04+00:00Added an answer on June 3, 2026 at 1:25 am

    It seems that 12d.exe does not understand some valid filenames, shame on 12d.exe.

    There are a couple actions you might do,

    1. try to pass the short filename instead. It may work in some cases where the hyphen - is off the right of the string. Not in your case, though, as it will probably translate as STAFF-~1 or something similar.

      call :invoke12d "Staff - Name\abc.4dm"
      goto :eof
      :invoke12d
      12d %~s1
      goto :eof
      
    2. or create a junction, a symbolic link, to call the directory with another name that does not contain hyphens. See this http://technet.microsoft.com/en-us/sysinternals/bb896768 for more information and to download a simple tool.

      junction staffnam "Staff - Name"
      12d.exe "staffnam/abc.4dm"
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Language: C++, MFC Problem: I am attempting to pass a function some pointers to
I'm attempting to pass perl variables into a system command and then capture the
I am attempting to pass function scope to a callback method. The problem I
I'm attempting to run a powershell script from C#. I have no problem passing
I'm attempting to pass out an array of strings from a Silverlight application to
I've got an android application that I'm attempting to use to pass some data
I am attempting to pass a text box value into a SQL query, something
I have a UISplitViewController in which i'm attempting to pass an int value from
I'm attempting to pass the contents of a file into a Webview. Using the
I am attempting to pass back a Node type from this function, but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.