The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-18-2008
Jamil Qadir Jamil Qadir is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 13
how I change dir in dos

Hi

I have a dos batch file in window server where I call a cmd command for creating some db.
this cmd commad is located in e:\data\abcd\xyz.cmd.

Now I call this batch file from unix ssh.sh but my access point is D in window server here I want to change the dos prompt to e:\data\abcd.
in xyz.bat.

here is my batch file

regards

JAmil

SETLOCAL


set DateStr=%~2&if "%~2"=="" set DateStr=%date%
for /f "skip=1 tokens=2-4 delims=(-)" %%a in ('"echo.|date"') do (
for /f "tokens=1-3 delims=/.- " %%A in ("%DateStr:* =%") do (
set %%a=%%A&set %%b=%%B&set %%c=%%C))
rem set /a "yy=10000%yy% %%10000,mm=100%mm% %% 100,dd=100%dd% %% 100"


set filename=%yy%%mm% %dd%
echo.%filename%

Cd E:
cd \data
cd E:\data\local-ch-da

E:\data\local-ch-da\start_local-CH-DA_cablecom.cmd %yy%%mm% %dd%



endlocal