[doskey]์๋์ฐ์์ Cmd์ alias์ค์ ํ๊ธฐ
#์ค๋ช
๋ฆฌ๋ ์ค์์ alias๋ฅผ ํธํ๊ฒ ์์ฃผ ์ฌ์ฉํ๋๋ฐ CMD์์๋ ์ฌ์ฉํ๊ณ ์ถ์๋๊ฐ ์์ต๋๋ค, ์๋์ฐ์๋ ๋น์ทํ ๊ธฐ๋ฅ์ด ์๋๋ฐ์ ๋ฐ๋ก doskey ์ ๋๋ค
seen from South Korea

seen from United Kingdom
seen from Tรผrkiye
seen from Germany

seen from Netherlands

seen from France
seen from Tรผrkiye
seen from United States
seen from Yemen

seen from Tรผrkiye
seen from Sweden
seen from Jamaica
seen from United Kingdom
seen from United Kingdom
seen from Norway
seen from Russia
seen from United States
seen from T1
seen from United States

seen from United States
[doskey]์๋์ฐ์์ Cmd์ alias์ค์ ํ๊ธฐ
#์ค๋ช
๋ฆฌ๋ ์ค์์ alias๋ฅผ ํธํ๊ฒ ์์ฃผ ์ฌ์ฉํ๋๋ฐ CMD์์๋ ์ฌ์ฉํ๊ณ ์ถ์๋๊ฐ ์์ต๋๋ค, ์๋์ฐ์๋ ๋น์ทํ ๊ธฐ๋ฅ์ด ์๋๋ฐ์ ๋ฐ๋ก doskey ์ ๋๋ค

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch โข No registration required โข HD streaming
Running Ruby scripts with DOSKEY
Letโs say you want to run a ruby script a bunch of times, but you want to do so temporarily (no permanent changes/aliasing). ย As long as youโre within the same command session itโs pretty simple, but there are a couple of things to watch out for.
If your script involves ARGV in some way, you have to include that in your macro definition. ย The following will not work to display/run whateverโs triggered by a userโs question command:
DOSKEY roll=ruby file_name.rb roll question
You have to set the command to include the possible entry options. ย The following will work for the above scenario, assuming that your underlying Ruby code works.
DOSKEY question=ruby file_name.rb question question
You will have to reset these if you leave the session, but if youโre doing something temporary like running a script to test someoneโs knowledge before a test or interview, this works pretty well.
How to download a whole folder using wget on Windows or Linux and cmd magic
We sometimes need to download some full ftp folder, especially when teachers / lecturers share some materials (or presentations) and won't think of putting it in one archive. If we try just using command:
wget http://some.ftp.com/folder/and/folder2
we would get index.html file. We should do that this way:
wget -r -np -nH โcut-dirs=3 -R index.html http://some.ftp.com/folder/and/folder2
We will get all the files from folder2. I found this solution here. It seems that there's more nerd friendly stuff.
But to explain it to humans: you use wget from command line. On Windows it would be cmd.exe. You may just search for cmd.exe and I recommend to make a shortcut for it, which we will use for some nice trick.
Normally wget installs to "C:\Program Files\GnuWin32\" and application executable is inside folder "bin". So, to use it in command line, we would need to type or copy full path every time we use it, but here comes doskey:
DOSKEY wget="C:\Program Files\GnuWin32\bin\wget.exe" $*
This command makes "wget" point to our wget.exe binary. But after exiting cmd, it will 'forget' what we set with doskey. To avoid this, we create a *.cmd file using notepad or whatever text editor we like, paste above code there and save as "filename.cmd". It should look like this:
@echo off DOSKEY wget="C:\Program Files\GnuWin32\bin\wget.exe" $*
Thanks to first line we won't see any notifications starting terminal with this file. We create then shortcut to cmd.exe, and then edit it to make it point to "C:\Windows\System32\cmd.exe /K C:\path\to\your\file.cmd". Now when we start cmd using our link "wget" runs wget. We may also add an alias for downloading full directory:
DOSKEY wgetdir="C:\Program Files\GnuWin32\bin\wget.exe" -r -np -nH ‐‐cut-dirs=3 -R index.html $*
Now command for downloading a whole ftp directory and its subdirectories would be:
wgetdir http://some.ftp.com/and/its/folders/
I hope you enjoy being nerds with me.
Here's where I found the doskey solution.