|
echo off |
|
echo Please make sure base_loc variable is set to the desired drive (e.g. C:, D:, E:) |
|
set base_loc=C: |
|
set proj_dir=%base_loc%\Projects\LinkProject |
|
set lab_dir=%proj_dir%\Lab |
|
set target_dir=%lab_dir%\dirA\dir1 |
|
|
|
REM These are the cleanup lines . . . |
|
REM echo Cleaning up directories |
|
REM del %lab_dir%\test.txt |
|
REM rmdir %target_dir% |
|
REM rmdir %lab_dir%\JunctionA1 |
|
REM del %lab_dir%\SymlinkdA1 |
|
REM del %lab_dir%\test.txt.lnk |
|
REM del %lab_dir%\test_hard.txt |
|
|
|
REM Making a target directory |
|
REM We will be moving this to do target moving testing |
|
|
|
echo Creating target directory %target_dir% . . . |
|
md %target_dir% |
|
|
|
REM Create a junction |
|
echo Creating junction . . . |
|
mklink /J %lab_dir%\JunctionA1 %target_dir% |
|
|
|
REM Create a symlinkd |
|
echo Creating symlinkd . . . |
|
mklink /d %lab_dir%\SymlinkdA1 %target_dir% |
|
|
|
REM Create file |
|
echo Creating target file . . . |
|
echo lab test > %lab_dir%\test.txt |
|
|
|
REM Create soft link / symlink to the file |
|
echo Creating a symlink/"soft link" to the file . . . |
|
mklink %lab_dir%\test.txt.lnk %lab_dir%\test.txt |
|
|
|
REM Create hard link to the file |
|
echo Creating a hard link to the file . . . |
|
mklink /h %lab_dir%\test_hard.txt %lab_dir%\test.txt |
|
|
|
REM Create shortcut to the file |
|
echo Create a shortcut to the file (manually, please) . . . |
|
pause |
|
|
|
REM Now display the results of dir /a:l |
|
echo Running DIR /A:L |
|
dir /a:L /s %lab_dir% |