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

  • Home
  • SEARCH
  • 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 4624880
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:11:34+00:00 2026-05-22T03:11:34+00:00

command line parameters are either fed to and read by batch file or hard

  • 0

command line parameters are either fed to and read by batch file or hard coded in batch file

Set Target_computer = %1
REM  Get Source URL
Set SOURCE_URL = %2
REM Set Source Directory
SET SOURCE_DIR = \reference_data_update

and display when bat file executes. However, when two of them are concatenated

xcopy %SOURCE_URL%%SOURCE_DIR% d:\dqxi\11_7\reference_data /Y/H/S/R

they are not read. The command echoes as

xcopy    d:\dqxi\11_7\reference_data /Y/H/S/R

How can I get these variables to work in the batch file to perform the work I need the bat file to perform (xcopy from the source server’s reference_data_update directory to the target server’s reference_data directory)?

  • 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-22T03:11:35+00:00Added an answer on May 22, 2026 at 3:11 am

    try removing the spaces (near the set command)

    @echo off
    Set Target_computer=%1
    REM  Get Source URL
    Set SOURCE_URL=%2
    REM Set Source Directory
    SET SOURCE_DIR=\reference_data_update
    ::and display when bat file executes. However, when two of them are concatenated
    
    echo %SOURCE_URL%%SOURCE_DIR% d:\dqxi\11_7\reference_data /Y/H/S/R
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Further to How to Pass Command Line Parameters in batch file how does one
My program accepts input file names either as command line parameters or in a
I'm looking for a set of command line parameters that will allow me to
How do I read command-line parameters in C? For example, in ./test --help or
InnoSetup setup executables have command line options to permit unattended or batch file operation
I'm working on a Perl script. How can I pass command line parameters to
I want to split a command line like string in single string parameters. How
Background In a C# command-line app I'm writing, several of the parameters have yes
The (command line) interface I have in mind is like so: watching FILE+ do
Battling with a windows command line script I just can't get to work. Basically

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.