WinXP CMD commands

This is a discussion on WinXP CMD commands within the Tech Board forums, part of the Community Boards category; Was writing a few CMD commands to relieve some tedious copying work, but these didn't work at all. I made ...

  1. #1
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    WinXP CMD commands

    Was writing a few CMD commands to relieve some tedious copying work, but these didn't work at all. I made a simple test after reading some references:
    Code:
    set x = 23
    set y = a%x%b %x% c
    set y
    And this gave the output:
    Code:
    y = ab  c
    This doesn't seem right at all, what could be wrong? The variable is empty...?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  2. #2
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,109
    Code:
    @ECHO OFF
    set x=23
    set y=a%x%b %x% c
    echo %y%
    pause
    output:
    Code:
    a23b 23 c
    Press any key to continue . . .
    Works for me... When you put a space between the var name and the value it wont work though.

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Seemed to solve it, thanks!
    (I'd expect the references to mention an important detail as this one...)
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Executing DOS commands from inside an image
    By Moony in forum C Programming
    Replies: 6
    Last Post: 03-16-2008, 12:40 PM
  2. on winXP: run cmd on selected directory?
    By pheres in forum Tech Board
    Replies: 3
    Last Post: 08-12-2007, 01:13 AM
  3. Replies: 2
    Last Post: 07-27-2007, 12:48 PM
  4. problem: online on winxp and linux red hat
    By gemini_shooter in forum Linux Programming
    Replies: 5
    Last Post: 05-29-2005, 02:14 PM
  5. Dos commands hehe
    By Carp in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 01-17-2003, 01:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21