in reply to Setting a path for a sub function

I tried the exact same thing. It works, no prob at all.. I have only one thought, part of the problem with using 8 character names for the directory (vs long name) is that it is not ALWAYS going to be "mydocu~1".

It may be that this is the case here (I have never seen it for My Documents but I have seen cases where the 8 character name is not what you think it is :-) ). Like the others have mentioned, really need the error message from warn or die..

You could try passing the dir in single quotes with the whole name, see if this makes a difference (ie: 'c:\my documents')