Issue with a variable in my batch script -
i want script to:
- accept variable
- create path using variable input
- display path
- display contents of directory
what wrong following code? echo statement prints your directory set to; dir statement works expected.
@echo off set custompath = "c:\users\%1" echo directory set %custompath% dir %custompath%
it's space around =.
@echo off set custompath="c:\users\%1" echo directory set %custompath% dir %custompath% check this post.
Comments
Post a Comment