Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Change Directory In Addition To Changing Folder

Featured Replies

I want to change directory in addition to changing folder.

This is possible on the Windows 2000/XP with "/d" parameter.

cd /d %winbootdir%

How can I do same thing on Windows 98?

Thx.

You could use this method to change to the boot directory:

cd\

cd %SYSTEMROOT%

Not sure if it will work on Win 98 but you could try it.

Gape

This wiil give change drive and directory functions in script.

@echo off
:: create change drive and directory bat
:: before changing drive and directory execute pushd.bat
:: then execute cdd.bat when finished and you wish to return execute popd.bat
echo @echo off > %windir%\cdd.bat
echo %%1\ >> %windir%\cdd.bat
echo cd %%1 >> %windir%\cdd.bat
:: create pushd.bat and popd.bat
echo %%"%% echo e 100 "cdd " >%temp%\script.txt %%"%% > %windir%\pushd.bat
echo %%"%% echo rcx>>%temp%\script.txt %%"%% >> %windir%\pushd.bat
echo %%"%% echo 4>>%temp%\script.txt %%"%% >> %windir%\pushd.bat
echo %%"%% echo n %windir%\popd.bat>>%temp%\script.txt %%"%% >> %windir%\pushd.bat
echo %%"%% echo w >> %temp%\script.txt %%"%% >> %windir%\pushd.bat
echo %%"%% echo q >>%temp%\script.txt %%"%% >> %windir%\pushd.bat
echo %%"%% debug <%temp%\script.txt > NUL %%"%% >> %windir%\pushd.bat
echo %%"%% del %temp%\script.txt %%"%% >> %windir%\pushd.bat
echo %%"%% truename | find ":" >> %windir%\popd.bat %%"%% >> %windir%\pushd.bat

Add the above to begining of script.

Creates cdd.bat and pushd.bat.

Pushd.bat will create popd.bat each time it's called.

call %windir%\pushd.bat
call cdd %windir%
:: do somthing here
:: for example
dir/a/ogen
:: return to original drive and directory
call %windir%\popd.bat

A sample usage above. Each time you need it call pushd.bat first,

then call cdd.bat. Do what you need to do then call popd.bat.

:: when all done clean up
del %windir%\pushd.bat
del %windir%\popd.bat
del %windir%\cdd.bat

At end of script use above.

credits:

cdd.bat

http://home7.inet.tele.dk/batfiles/main/tricktip.htm

pushd.bat(modified to use cdd.bat)

http://www.ericphelps.com/batch/samples/pushpath.bat.txt

  • Author

I have just found the solution:

%winbootdir%.\
cd %winbootdir%

It works perfectly... :thumbup

Gape

Yes it's the same as the cdd.bat above.

The rest of the code gives the ability to return to the starting directory

across drive and directory. Thought it might be usefull if the service pack

was launched from a drive other than c:.

The period after %winbootdir% is not needed.

  • Author

Thanks tentonine,

It's a very good batch file, maybe I'll use it later. For RC2, I think my solution is enough.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.