Batch file: Trying to declare a variable for a directory or filename -


i trying make command line user can perform tasks when typing words, little confused @ how should declare variables directory , filenames. have far:

@echo off echo welcome linux bash command line simulator! echo enter commands below set "v=%globalparam1%" set "path=%globalparam2%" set "file=%globalparam3%" set "v=%v%" goto :vcheck :vprompt set /p "v=lcl> " :vcheck if not defined v goto :vprompt if "%v%" == "ls" ( echo using windows command dir dir goto :vprompt ) if "%v%" == "cp" ( echo usage: cp sourcefile destinationfile goto :vprompt ) if "%v%" == "cp %file% %path%" ( echo using windows command copy %file% %path% copy "%file%" "%path%" goto :varprompt ) 

also when try concatenate strings, gives me "unrecognized command" error. there i'm missing?


Comments