Aaron Saray

open source programmer,
web developer

entrepreneur, author
and musician

My Blog

contains PHP, Web and business/entrepreneurial related content. Please join in the conversation!

When your linkd causes you problems, you must convertd it!

For the setup I use at (“the triangle”), I have alot of filesystem links – and these are made on win32 with the linkd.exe command (the version I got is from the windows 2000 resource cd). When I start a new project, I pass into my script which directories I’d like to make and checkout code into, and which I’d rather just linkd to. Well, every once in a while a link’d folder needs to be a real folder. So, since I’m a lazy programmer, I made a script called ‘convertd’ which will unlink the folder and then make the folder. Chalk one up to efficiency by batch programming? Lets see:

Here is the content of my convertd.bat file.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
@echo off
REM - Script to remove a linkd and make a directory there instead

if "%1" == "" goto errNoDir
if not exist %1 goto errNotExist

:main
linkd %1 /D
mkdir %1
echo directory made %1
goto end

:errNotExist
echo %1 does not exist
goto end

:errNoDir
echo A directory is required
goto end

:end

So now, I just run ‘convertd directoryName’ and I’m golden. Yep, thats lazy! ;)

This entry was posted in scripting and tagged . Bookmark the permalink.

One Response to When your linkd causes you problems, you must convertd it!

  1. Hal Vuncannon says:

    Have you ever considered adding additional videos to your blog to keep the readers more involved? I just read through the whole article and it was very nice but since I am more of a visual learner, I find videos to be more helpful. I enjoy what you guys are always coming up with. Keep up the excellent work. I will return to your page regularly for some new post.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>