0

I'm trying to right doskey named that takes an argument. It should execute:

C:\User\Mercurius\Music\youtube-dl.exe -x --audio-format mp3 -f bestaudio "https://www.youtube.com/watch?v=ARGUMENT_HERE"

I tried this:

doskey youtube.com/watch?v=C\User\Mercurius\Music\youtube-dl.exe -x --audio-format mp3 -f bestaudio "https://www.youtube.com/watch?v=c2gSzYLJ8sY"

Then I tried using it but it failed:

C:\Users\Mercurius\Music>youtube.com/watch?v=
'youtube.com' is not recognized as an internal or external command,
operable program or batch file.

May you please help

Noitidart
  • 234
  • 1
  • 4
  • 16
  • 1
    The definition of a macro should have a short name and standard paramters used every time and either $1..$n or $* to include the parameters entered when **using** the macro. See https://ss64.com/nt/doskey.html or google for `doskey tutorial` – LotPings Nov 17 '18 at 16:23
  • Thanks @LotPings I changed it to this: `doskey yt=C\User\Mercurius\Music\youtube-dl.exe -x --audio-format mp3 -f bestaudio "https://www.youtube.com/watch?v=$1"` but when I try `yt 1234` I get error "The system cannot find the path specified." – Noitidart Nov 17 '18 at 16:30
  • 1
    The colon is missing in the drive – LotPings Nov 17 '18 at 16:32
  • @LotPings if I restart command prompt, the doskey's are not rememberd. is there a way to make them persist? – Noitidart Nov 18 '18 at 01:34
  • Otherwise I have to keep typing `doskey yt=C:\Users\Mercurius\Music\youtube-dl.exe -x --audio-format mp3 -f bestaudio "https://www.youtube.com/watch?v=$1"` – Noitidart Nov 18 '18 at 01:40
  • Please read this: https://superuser.com/a/1134468/576324 – Mayra Delgado Jan 30 '19 at 11:54

0 Answers0