• Hi,

    just a small error ...

    henrik staun poulsen (11/23/2007)


    Here is my suggestion.

    SET @loopcounter=0

    WHILE @loopcounter < 26 BEGIN

    SET @loopcounter=@loopcounter+1

    SET @driveletter=CHAR(66 + @loopcounter) -- 66 = letter C

    if you start with drive C: you do not have 26 driveletters left, so it should be

    WHILE @loopcounter < 24 BEGIN