Varibles in Batch files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hacksign23
    New Member
    • Nov 2008
    • 8

    Varibles in Batch files

    Okay, so I know how to make a variable:
    set bla = blabla
    but then i want to set it as a directory of "cd"

    so then if the directory was C:\WINDOWS,
    i want bla to = cd
    so something like
    set bla = cd
    but that doesn't work. any help?
    thanks
  • abdoelmasry
    New Member
    • Oct 2006
    • 104

    #2
    hi man
    your question is not clear

    you mean to make a variable to carry the current directory path ??

    if yes you can directly use the pre-defined variable %CD%
    like this:
    @echo off
    echo the current directory is %CD%
    pause
    exit

    Comment

    Working...