How to make Output filename template for youtube-dl using batch file window?











up vote
0
down vote

favorite












I ran command in command prompt which work like charm.



youtube-dl -o "D:yt%~1%(playlist)s%(playlist_index)s - %(title)s.%(ext)s" --batch-file=ylink.txt


Now, I want this command to execute from batch file. So, I have created batch file y.bat and save the above command to this file.



and when I ran y "Some folder name"



then I expect the result should be like this one.



youtube-dl -o "D:ytSome folder name%(playlist)s%(playlist_index)s - %(title)s.%(ext)s" --batch-file=ylink.txt


but the actual output is



youtube-dl -o "D:lyndaSome folder name(playlist_index)s - (ext)s"  --batch-file=ylink.txt


How to write the command in batch file so that my output should be exactly



youtube-dl -o "D:ytSome folder name%(playlist)s%(playlist_index)s - %(title)s.%(ext)s"  --batch-file=ylink.txt


I did tried to find the answer but couldn't find the relevant one.

The most relevant one which I found is this one, but even this one didn't work for me and I what I made change is I replace the above command with



youtube-dl -o "D:yt%~1%%(playlist)s%%(playlist_index)s - %(title)s.%(ext)s" --batch-file=ylinka.txt


and then I execute, It still convert that variable into



youtube-dl -o "D:ytSome folder name%(playlist)s2).txt" --batch-file=ylinka.txt









share|improve this question
























  • You didn't change the title and ext variables.
    – Biswapriyo
    Nov 21 at 7:32










  • @Biswapriyo, Thanks you so much, I am so stupid, should had cross check before asking.
    – Vinay
    Nov 21 at 15:38










  • @Biswapriyo, Yes it works like charm.
    – Vinay
    Nov 21 at 19:25















up vote
0
down vote

favorite












I ran command in command prompt which work like charm.



youtube-dl -o "D:yt%~1%(playlist)s%(playlist_index)s - %(title)s.%(ext)s" --batch-file=ylink.txt


Now, I want this command to execute from batch file. So, I have created batch file y.bat and save the above command to this file.



and when I ran y "Some folder name"



then I expect the result should be like this one.



youtube-dl -o "D:ytSome folder name%(playlist)s%(playlist_index)s - %(title)s.%(ext)s" --batch-file=ylink.txt


but the actual output is



youtube-dl -o "D:lyndaSome folder name(playlist_index)s - (ext)s"  --batch-file=ylink.txt


How to write the command in batch file so that my output should be exactly



youtube-dl -o "D:ytSome folder name%(playlist)s%(playlist_index)s - %(title)s.%(ext)s"  --batch-file=ylink.txt


I did tried to find the answer but couldn't find the relevant one.

The most relevant one which I found is this one, but even this one didn't work for me and I what I made change is I replace the above command with



youtube-dl -o "D:yt%~1%%(playlist)s%%(playlist_index)s - %(title)s.%(ext)s" --batch-file=ylinka.txt


and then I execute, It still convert that variable into



youtube-dl -o "D:ytSome folder name%(playlist)s2).txt" --batch-file=ylinka.txt









share|improve this question
























  • You didn't change the title and ext variables.
    – Biswapriyo
    Nov 21 at 7:32










  • @Biswapriyo, Thanks you so much, I am so stupid, should had cross check before asking.
    – Vinay
    Nov 21 at 15:38










  • @Biswapriyo, Yes it works like charm.
    – Vinay
    Nov 21 at 19:25













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I ran command in command prompt which work like charm.



youtube-dl -o "D:yt%~1%(playlist)s%(playlist_index)s - %(title)s.%(ext)s" --batch-file=ylink.txt


Now, I want this command to execute from batch file. So, I have created batch file y.bat and save the above command to this file.



and when I ran y "Some folder name"



then I expect the result should be like this one.



youtube-dl -o "D:ytSome folder name%(playlist)s%(playlist_index)s - %(title)s.%(ext)s" --batch-file=ylink.txt


but the actual output is



youtube-dl -o "D:lyndaSome folder name(playlist_index)s - (ext)s"  --batch-file=ylink.txt


How to write the command in batch file so that my output should be exactly



youtube-dl -o "D:ytSome folder name%(playlist)s%(playlist_index)s - %(title)s.%(ext)s"  --batch-file=ylink.txt


I did tried to find the answer but couldn't find the relevant one.

The most relevant one which I found is this one, but even this one didn't work for me and I what I made change is I replace the above command with



youtube-dl -o "D:yt%~1%%(playlist)s%%(playlist_index)s - %(title)s.%(ext)s" --batch-file=ylinka.txt


and then I execute, It still convert that variable into



youtube-dl -o "D:ytSome folder name%(playlist)s2).txt" --batch-file=ylinka.txt









share|improve this question















I ran command in command prompt which work like charm.



youtube-dl -o "D:yt%~1%(playlist)s%(playlist_index)s - %(title)s.%(ext)s" --batch-file=ylink.txt


Now, I want this command to execute from batch file. So, I have created batch file y.bat and save the above command to this file.



and when I ran y "Some folder name"



then I expect the result should be like this one.



youtube-dl -o "D:ytSome folder name%(playlist)s%(playlist_index)s - %(title)s.%(ext)s" --batch-file=ylink.txt


but the actual output is



youtube-dl -o "D:lyndaSome folder name(playlist_index)s - (ext)s"  --batch-file=ylink.txt


How to write the command in batch file so that my output should be exactly



youtube-dl -o "D:ytSome folder name%(playlist)s%(playlist_index)s - %(title)s.%(ext)s"  --batch-file=ylink.txt


I did tried to find the answer but couldn't find the relevant one.

The most relevant one which I found is this one, but even this one didn't work for me and I what I made change is I replace the above command with



youtube-dl -o "D:yt%~1%%(playlist)s%%(playlist_index)s - %(title)s.%(ext)s" --batch-file=ylinka.txt


and then I execute, It still convert that variable into



youtube-dl -o "D:ytSome folder name%(playlist)s2).txt" --batch-file=ylinka.txt






windows command-line batch batch-file youtube-dl






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 at 19:26

























asked Nov 21 at 5:15









Vinay

11




11












  • You didn't change the title and ext variables.
    – Biswapriyo
    Nov 21 at 7:32










  • @Biswapriyo, Thanks you so much, I am so stupid, should had cross check before asking.
    – Vinay
    Nov 21 at 15:38










  • @Biswapriyo, Yes it works like charm.
    – Vinay
    Nov 21 at 19:25


















  • You didn't change the title and ext variables.
    – Biswapriyo
    Nov 21 at 7:32










  • @Biswapriyo, Thanks you so much, I am so stupid, should had cross check before asking.
    – Vinay
    Nov 21 at 15:38










  • @Biswapriyo, Yes it works like charm.
    – Vinay
    Nov 21 at 19:25
















You didn't change the title and ext variables.
– Biswapriyo
Nov 21 at 7:32




You didn't change the title and ext variables.
– Biswapriyo
Nov 21 at 7:32












@Biswapriyo, Thanks you so much, I am so stupid, should had cross check before asking.
– Vinay
Nov 21 at 15:38




@Biswapriyo, Thanks you so much, I am so stupid, should had cross check before asking.
– Vinay
Nov 21 at 15:38












@Biswapriyo, Yes it works like charm.
– Vinay
Nov 21 at 19:25




@Biswapriyo, Yes it works like charm.
– Vinay
Nov 21 at 19:25















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377176%2fhow-to-make-output-filename-template-for-youtube-dl-using-batch-file-window%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377176%2fhow-to-make-output-filename-template-for-youtube-dl-using-batch-file-window%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

AnyDesk - Fatal Program Failure

How to calibrate 16:9 built-in touch-screen to a 4:3 resolution?

QoS: MAC-Priority for clients behind a repeater