Comamnd-line tips and tricks
Below are some of the windows commandline tools that I need to remember
Create a symbolic link
This I use to control what files are in my cloud-back-up folder. Instead of placing a copy of the files in the backup folder I place a sym-link and the files I choose are backed up.
mklink /D [target] [source]
note the /D
is used to indicate a directory.
Make ls
work on Windows
Some habbits die hard so in this case I accommodated them
ls
in the linux version of dir
Step 1: Create a .bat file
I named mine autorun.bat and everything that I put in it will run when I login.
@ECHO OFF
:: Makes ls work
doskey ls=dir /b $*
doskey ll=dir $*
doskey cat=type $*
doskey ..=cd..
doskey grep=find "$1" $2
doskey mv=ren $*
doskey rm=del $*
Step 2:
Use the Task Schedule to run this file. To open the scheduler simply WIN key and type in scheduler. Then Action >> Create Basic task. The rest should be self-explanatory
Make a directory a drive
This is useful when moving from one machine to another and keeping some full path links intact. Below is an excerpt from a simple bat file that I use.
:: Set up my sync folder as e:\
subst e: C:\Users\cchisholm\Sync