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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:26:39+00:00 2026-05-18T20:26:39+00:00

Source:http://jpsoft.com/help/index.htm?alias.htm Aliases can use command line parameters or parameters like those in batch files.

  • 0

Source:http://jpsoft.com/help/index.htm?alias.htm

Aliases can use command line
parameters or parameters like those in
batch files. The command line
parameters are numbered from %0 to
%511. (%0 contains the alias name.)

For example, the following alias will
change directories, perform a command,
and return to the original directory:

alias in pushd %1 & %2$ & popd

when i run the above, my command prompt gives error saying

%1 * Unable to read value of alias *
‘%2’ is not recognized as an internal or external command,
operable program or batch file.
‘popd`’ is not recognized as an internal or external command,
operable program or batch file.

if you use double quote instead, alias in “pushd %1 & dir & popd”
it doesn’t interprets the %1 when you execute the alias

C:\abc\def>alias
Dumping all defined aliases for CMD.EXE.
in =pushd %1 & dir & popd

alias def wont work

———EDIT————
let me try some sample output with a simple echo alias

D:\abc\def>alias /?

Usage: ALIAS [-v] [-p programName] [-f filespec] [ ]

         [-v] means verbose output.

         [-d] means delete aliases.

         [-p programName] specifies which image file name these alias

                          definitions are for.  Default is CMD.EXE

         [-f filespec] specifies a file which contains the alises.

C:\Office\dev15>alias out ‘echo %1’

%1′ * Unable to read value of alias *

C:\Office\dev15>alias out backtick echo %1 backtick

%1` * Unable to read value of alias *

C:\Office\dev15>alias out “echo %1”

C:\Office\dev15>alias

Dumping all defined aliases for CMD.EXE.

out             =echo %1

C:\Office\dev15>out abc

%1

C:\Office\dev15>alias out echo %1

%1 * Unable to read value of alias *

C:\Office\dev15>out abc

ECHO is on.

Problem is,
both single quote and back tick produces error,
while double quote wont treat %1 as variable parameter
also tried with none of the quotes.
still wouldnot work

  • 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-18T20:26:39+00:00Added an answer on May 18, 2026 at 8:26 pm

    Okay, try this (use copy and paste):

       alias dtxt = `pushd %1 & dir %2$ & popd`
    

    This sets the alias ‘dtxt‘ to the following commands:

       pushd %1
       dir %2
       popd
    

    Pay particular attention to the inverted single quotes (`) around the alias definition. This is found on the top-left key on the ISO (UK) and ANSI (US) keyboards.

    You will need to supply two parameters, %1 and %2 when executing dtxt – a target pathname, and a parameter for the DIR command as in the following examples:

       dtxt c:\temp *.txt
    

    In a nutshell, PUSHD pushes the current working directory name onto a LIFO stack and changes directory to c:\temp.

    The DIR command then executes with %2 as it’s parameter – in this case ‘*.txt‘.

    Finally, POPD restores the previous working directory by popping it off the stack.

    FYI, this is equivalent to the following standard DOS command:

       dir c:\temp\*.txt
    

    The following command in standard DOS will also work fine:

       pushd & dir *.txt & popd
    

    But obviously, ‘dtxt‘ is shorter and saves keystrokes!

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

Sidebar

Related Questions

Source:http://jpsoft.com/help/index.htm?alias.htm Aliases can use command line parameters or parameters like those in batch files.
I am trying to turn the the flash page flip (source: http://76design.com/shiftcontrol/index.php/2005/07/03/dynamic-page-flip/ ) into
Source: http://asciicasts.com/episodes/16-virtual-attributes I'd like to achieve a similar setup as below, but in CakePHP
I got the DatePicker from this source http://silverlight.codeplex.com/ and I am trying to use
Hi i use the following simple jquery script to append input. Source http://muiomuio.com/web-design/add-remove-items-with-jquery <html
source http://technet.microsoft.com/en-us/library/ms162234%28SQL.100%29.aspx code //Connect to the local, default instance of SQL Server. { Server
Original source: http://twitter.com/tobeytailor/status/8998006366 (x=[].reverse)() === window // true I've noticed that this behavior affects
I'm using a MediaElement with this source: http://origin-community.ministryofsound.com/asx/radio/mosRadio.asx When I open it with Windows
Take a look at this snazy plugin: http://remysharp.com/2007/12/28/jquery-tag-suggestion/ ** it's real small Source: http://remysharp.com/downloads/tag.js
I saw page when I was Searching with the key word Open source http://www.opensource.apple.com/release/mac-os-x-1064/

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.