VideoHelp Forum


Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!


Try StreamFab Downloader and download streaming video from Youtube, Netflix, Amazon! Download free trial.


+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Member
    Join Date
    Mar 2015
    Location
    Silicon Valley, California
    Search Comp PM
    I have been using youtube-dl, but by default it saves the videos in C:\Documents and Settings\Administrator\.

    I would like it to save them in C:\Documents and Settings\Administrator\My Documents\Downloads\$temp\. So I tried to follow the instructions for creating a configuration file. I named it "config.txt" and put it in the path. It contains one line:

    Code:
    -o "C:\Documents and Settings\Administrator\My Documents\Downloads\$temp\"
    When I run youtube-dl from the command line (youtube-dl "https://xxx"), it runs, but it stores the video in

    C:\Documents and Settings\Administrator\My Documents\Downloads\C#\DOCUME~1\ADMINI~1\LOCALS~1

    What am I doing wrong?
    Quote Quote  
  2. What do you expect "$temp" to do?

    Youtube-dl expects path incl. file name:
    Code:
    -o "C:\Documents and Settings\Administrator\My Documents\Downloads\%(title)s-%(id)s.%(ext)s"
    See documentation about wildcards.
    Quote Quote  
  3. Member
    Join Date
    Mar 2015
    Location
    Silicon Valley, California
    Search Comp PM
    Originally Posted by sneaker View Post
    What do you expect "$temp" to do?
    (chuckle) I expected it to be the name of the lowest level folder name.

    Youtube-dl expects path incl. file name:
    Code:
    -o "C:\Documents and Settings\Administrator\My Documents\Downloads\%(title)s-%(id)s.%(ext)s"
    See documentation about wildcards.
    I tried to figure that out, but the hieroglyphics eluded me. Your code seems to be working, but it's going into "\downloads". This slight modification does what I want:
    Code:
    -o "C:\Documents and Settings\Administrator\My Documents\Downloads\$temp\%(title)s-%(id)s.%(ext)s"
    I'll try to decipher the hieroglyphics again.

    Thanks very much.
    Quote Quote  
  4. Member
    Join Date
    Mar 2015
    Location
    Silicon Valley, California
    Search Comp PM
    Well, it looks like you are right that I need to read up on the wildcards. My code causes the videos to go into,

    Code:
    C:\Documents and Settings\Administrator\My Documents\Downloads\C#\DOCUME~1\ADMINI~1\LOCALS~1\Temp
    I'll be interested to learn how one little "$" caused all that!

    Cheers...
    Quote Quote  
  5. I believe $temp is interpreted as the environment variable temp (the system defined temporary folder). Open a CLI window and type "set" (or "set temp", or "echo %temp%"). That will show you the list of environment variables (or specifically the variable temp). Since colon isn't legal in the filename it was replaced with "#". You're still running XP?
    Last edited by jagabo; 26th Jan 2018 at 07:06.
    Quote Quote  
  6. Yes, "$" is the environment variable prefix in Unix and Linux, equivalent to "%" in DOS/Windows. Youtube-dl seems to be Unix/Linux centric -- at least judging by the docs, where Unix/Linux examples are listed first, for example -
    --ignore-config
    Do not read configuration files. When given in the global configuration file /etc /youtube-dl.conf: Do not read
    the user configuration in ~/.config/youtube- dl/config (%APPDATA%/youtube-dl/config.txt on Windows)
    So it seems "$" is hard coded as a variable prefix (some might call that a bug)
    Quote Quote  
  7. Member
    Join Date
    Mar 2015
    Location
    Silicon Valley, California
    Search Comp PM
    I changed "$temp" to "aatemp" in the config file and it's working.

    I use the "$" notation for temporary folders so they sort to the top. "aatemp" is the next best thing.

    Is there any kind of escape character in the syntax that will let me use the $ sign?
    Quote Quote  
  8. _temp will sort to the top.
    Quote Quote  
  9. Member
    Join Date
    Mar 2015
    Location
    Silicon Valley, California
    Search Comp PM
    Originally Posted by jagabo View Post
    _temp will sort to the top.
    So will $temp, #temp, @temp, %temp, !temp, =temp, +temp, -temp, and probably others. Do you know if any of them have any unpleasant side effects like "$"?

    So is there no "escape" character that I can use in the -o parameters that will allow it to use "$temp"? Some syntax rules allow a way to use special characters that would otherwise be interpreted as actionable, like doubling the character "$$" or preceding it with an escape character "/$".

    Thanks
    Quote Quote  
  10. >Do you know if any of them have any unpleasant side effects like "$"?
    Yes, don't use %temp or you will be back where you started.
    Quote Quote  
  11. Member
    Join Date
    Mar 2015
    Location
    Silicon Valley, California
    Search Comp PM
    The "#" sign seems to work (#temp).
    Quote Quote  
  12. Careful with underscore. Windows shows it before the alphanumeric characters but I believe Linux shows it after. In general, look at an ASCII chart to see sort order (underscore appears after the alphanumerics).

    http://www.asciitable.com/
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!