Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The right way to change Command Prompt’s starting folder in Windows 11 depends on how you open it. For a persistent change in Windows Terminal, edit the Command Prompt profile’s startingDirectory setting. For a one-time launch, use wt -d; in a prompt that is already open, use cd /d.

Choose the method that matches how you open Command Prompt

  • Windows Terminal profile: Set that profile’s starting directory to make new tabs opened with it start in your chosen folder.
  • One-time Windows Terminal launch: Run wt -d "D:Work" to open Terminal at that location without changing the saved profile.
  • Already-open Command Prompt: Run cd /d "D:Work" to change the current prompt’s drive and directory.
  • Direct cmd.exe launch: Run cmd.exe /k "cd /d D:Work" to change directory and keep the prompt open.

These options have different scopes: a profile setting affects launches through that Terminal profile; a command changes only the current or specified launch. Avoid changing the broader cmd.exe startup behavior unless you specifically need it.

Set a persistent starting directory in Windows Terminal

  1. Open Windows Terminal and open Settings.
  2. Select the Command Prompt profile. If its command line has been customized, confirm it is the profile you actually use.
  3. Set Starting directory to the folder you want, then save the setting.
  4. Open a new tab using the Command Prompt profile to check that it starts in the chosen folder.

You can also edit the profile in settings.json. Add a property such as:

"startingDirectory": "C:\Users\YourName\Documents"

In JSON, each backslash in a Windows path must be escaped. Microsoft describes startingDirectory as the directory where the shell starts when loaded. If you do not define it, the documented default is %USERPROFILE%, but the launch context can change the result. Microsoft lists %WINDIR%System32 for a Start-menu launch, %USERPROFILE% for wt.exe launched through Run, and the folder currently viewed when Terminal is opened from File Explorer’s address bar. See Microsoft’s Windows Terminal profile settings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Terminal’s Settings UI where possible. If you edit a file directly, edit the active settings.json, not the generated defaults.json; changes to that generated file are ignored. Microsoft documents settings file locations for packaged and unpackaged Windows Terminal installations.

Use a one-time launch or change the current prompt

Open Windows Terminal at a folder once

Run wt -d "D:Work" from a Run dialog, another command prompt, or another command launcher. Replace the example path with the folder you want. The -d argument sets the starting directory for that launch; it does not change the saved profile default. See Microsoft’s Windows Terminal command-line arguments.

Rank #2
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
  • 256 GB SSD of storage.
  • Multitasking is easy with 16GB of RAM
  • Equipped with a blazing fast Core i5 2.00 GHz processor.

Change directory in an open Command Prompt

Enter:

cd /d "D:Work Files"

The /d switch changes both the current drive and directory, which matters when moving between drives. Quoting paths containing spaces makes the intended path clear. Microsoft documents this behavior in the Windows cd command reference.

Launch cmd.exe and leave it open in the folder

Use:

cmd.exe /k "cd /d D:Work Files"

The /k switch runs the command and keeps Command Prompt running. Use quotation marks around the path when it contains spaces, for example cmd.exe /k "cd /d "D:Work Files"" when entering a command line that requires the path’s embedded quotes. Command-line quoting rules vary depending on the program that launches the command, so if that form fails, launch cmd.exe first and then enter cd /d "D:Work Files". See Microsoft’s cmd command reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3

If another command launches a separate Command Prompt and you need to set its startup folder, Microsoft documents start /d <path> as the startup-directory option. See the start command reference.

Understand what “default” means for each launch

Windows Terminal’s defaultProfile chooses which profile opens when Terminal starts; it does not set that profile’s folder. The profile’s startingDirectory sets the folder. Changing one setting does not substitute for the other. The distinction is documented in Microsoft’s profile settings reference.

Rank #4
15.6 Inch Laptop Computer, N4020, 4GB DDR4 RAM, 128GB eMMC,with Windows 11
  • EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
  • 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
  • RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
  • ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
  • LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.

For direct cmd.exe launches, Windows also supports Command Processor AutoRun registry entries. Unless cmd.exe is started with /d, it checks machine-wide and current-user AutoRun values and executes configured commands. That is a broader startup mechanism than changing one Terminal profile, so inspect existing startup behavior before altering it. Microsoft describes AutoRun and the /d option in the cmd reference.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot a folder that changes back

  • Confirm the active profile: Make sure you edited the Command Prompt profile used by the tab or shortcut you open.
  • Check for startup commands: A profile command line, shell script, or other startup code can change directory after Terminal applies startingDirectory.
  • Separate profile selection from folder selection: Confirm defaultProfile selects the intended profile and that the profile’s own startingDirectory is correct.

Microsoft notes that shell code can change the location after Terminal applies the starting-directory setting; see its Windows Terminal troubleshooting guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

Bestseller No. 1
Bestseller No. 2
Dell Latitude 5420 14' FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
256 GB SSD of storage.; Multitasking is easy with 16GB of RAM; Equipped with a blazing fast Core i5 2.00 GHz processor.
$289.99
Bestseller No. 3
HP 14' HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
HP 14" HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
$249.99
Best Value
Windows 11 Laptop with i3 Processor 15.6" Work Laptop for College Students
  • 【Efficient Performance】 Powered by Intel Core i3 processor (2 cores, 4 threads, up to 3.4GHz) with 12GB RAM and 256GB SSD. Handles multitasking, office software, online classes, and HD video streaming smoothly. Integrated Intel UHD Graphics 620
  • Backlit Keyboard & Complete Package】Comes with a cool backlit keyboard. Comes with awebcam, dual stereo speakers (8Ω/1.0W each), DC charger, and user manual – ready for late-night studying, online classes, video conferencing, and daily productivity
  • 【Vibrant Display】 15.6-inch Full HD (1920x1080) anti-glare screen with 16:9 aspect ratio delivers crisp images and vivid colors – perfect for studying, watching lectures, or entertainment. Thin-bezel design maximizes viewing area
  • 【Fast Connectivity & Expansion】 Equipped with WiFi 6 (802.11ax) and Bluetooth 5.2 for stable, high-speed wireless. Features 3 x USB 3.0, HDMI 2.1, Type-C (supports PD3.0 fast charging), and a TF card slot expandable up to 2TB – easily connect external monitors, mice, drives, or expand storage for all your files
  • 【Long Battery Life & Portable】 Built-in 11.55V 5000mAh/57.75Wh high-capacity battery delivers approximately 7 hours of mixed-use battery life – enough for a full day of classes and assignments. Lightweight at just 1.63kg (3.6 lbs) and 19.5mm thin, plus a compact packing size – easily slips into a backpack for campus, library, or coffee shop

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.