DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: 2 launches: task manager, DOS prompt with directory  (Read 11,274 times)

ottenm

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 93
2 launches: task manager, DOS prompt with directory
« on: February 29, 2008, 02:36 AM »
Subject says it all, I just can't find either of them.  I can get DOS launched with an alias set to "cmd", but I'd like it to open in a different directory (not farr's).

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: 2 launches: task manager, DOS prompt with directory
« Reply #1 on: February 29, 2008, 03:01 AM »
very good idea -- does anyone know is there an easy way to open a commandline in a specific directory, or do i need to add a general purpose ability to change to a specific directory when specifying an alias?

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: 2 launches: task manager, DOS prompt with directory
« Reply #2 on: February 29, 2008, 11:11 AM »
About the commandline, that's simple. Just create a new alias and add the following as a result:

Code
cmd /k DRIVE: && cd FOLDER

Replacing DRIVE and FOLDER with the appropriate content.

ottenm

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 93
Re: 2 launches: task manager, DOS prompt with directory
« Reply #3 on: March 01, 2008, 01:00 AM »
Not having any luck.  Have tried many variations, even trimming them to just:
cmd /k D:  // thinking it would open cmd pointing to D:
and
cmd && dir // thinking it would open and run/display a dir

But nothing works, no cmd prompt even opens.  It does work with just "cmd" as the result, but points to the FARR directory.

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: 2 launches: task manager, DOS prompt with directory
« Reply #4 on: March 01, 2008, 01:26 AM »
Ok, i didn't test that, but now i tested something that works:
Code
"C:\WINDOWS\system32\cmd.exe /k d:\ && cd FOLDER"
Should be a solution. For some reason, the collons are necessary.

ottenm

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 93
Re: 2 launches: task manager, DOS prompt with directory
« Reply #5 on: March 01, 2008, 01:09 PM »
Perfect!  Thanks jgpaiva, without the double quotes, here's what worked for me:

C:\WINDOWS\system32\cmd.exe /k c: && cd MyFiles

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: 2 launches: task manager, DOS prompt with directory
« Reply #6 on: March 01, 2008, 11:55 PM »
Great ottemn, glad to know that :)

Original address: https://www.donationcoder.com/forum/index.php?topic=12529.0