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 6851599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:16:04+00:00 2026-05-27T01:16:04+00:00

If I execute cmd /c %programfiles%\mycode\md5sums.exe %temp% it works just fine. But when I

  • 0

If I execute

cmd /c "%programfiles%\mycode\md5sums.exe" %temp%

it works just fine. But when I execute

cmd /c "%programfiles%\mycode\md5sums.exe" %programfiles%

I get below error-

Error: Unable to read file/directory C:\Program

which means that md5sums.exe is trying to open C:\Program as opposed to full path given by %programfiles%

I’ve to use cmd /c as I’ve to run this command remotely.

How do I make it work?
I’ve tried using `”%programfiles%” but in this case even md5sums.exe is not getting executed.

Eventually I would like to use switch “/b” provided by md5sums.exe but at this point of time I am stuck at even making md5sums run on %programfiles%

  • 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-05-27T01:16:05+00:00Added an answer on May 27, 2026 at 1:16 am

    Try:

    cmd /c "%programfiles%\mycode\md5sums.exe" "%programfiles%"
                                               ^--------------^--quotes added
    

    Otherwise, you end up with something like:

    cmd /c "C:\Program Files\mycode\md5sums.exe" C:\Program Files
    

    and end up passing two arguments to md5sums, not a single path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In cmd.exe, I can execute the command copy c:\hello.txt c:\hello2.txt and it worked fine.
I execute the ftp.exe cmd through a C# System.Diagnostics.Process type. And I use the
when I execute the cmd ps -U root -u root -eo pid I get
I'm trying to do this: cmd.exe /C C:\Program Files\Somewhere\SomeProgram.exe > C:\temp\Folder Containing Spaces\SomeProgram.out However,
the problem in a nutshell: running plink(with specific arguments) works from cmd, but not
Does any one know how to execute below cmd through shell script? #!/bin/sh USERNAME=XYZ
I want to execute cmd commands using PHP, but I don';t want to execute
I execute a select to get the structure of a table. I want to
Is it possible to execute cmd commands in Windows OS with PHP exec() function?
I have an execute(String cmd) in a jsp script that calls the exec method

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.