Chester^ Posted March 23, 2005 Posted March 23, 2005 Hello everyone, is there a way to set a variable in a cmd file to get the current path it is located?like i have test.cmdstart /wait vb6.jsecho completei guess it looks for vb6.js in system32 like and gives an eror (file not found) it extracts in a the temp folder so i cant know the folder path evry time what i am looking for is a variable maybe, that will get the current path somthing like thistest2.cmdvariable1 = $current_path$start variable1\vb6.jsecho comlpeteIs this possible? Thanks
Yzöwl Posted March 23, 2005 Posted March 23, 2005 Use this snippetfor /f "tokens=*" %%a in ('cd') do set currdir=%%athen you can use %currdir% in the rest of your batch
Chester^ Posted March 23, 2005 Author Posted March 23, 2005 Use this snippetfor /f "tokens=*" %%a in ('cd') do set currdir=%%athen you can use %currdir% in the rest of your batch<{POST_SNAPBACK}>Thanks alot it works perfect
gunsmokingman Posted March 24, 2005 Posted March 24, 2005 Here Is A Another Wayecho off && cls && color 1f && Mode 62,3 && Set Here=%CD%TITLE %Here% && Echo Press Key To Closeset /p = Location=%Here%
Chester^ Posted March 24, 2005 Author Posted March 24, 2005 Thanks . any idea on how to do this in a .js file?
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now