I'm not sure that it actually has anything to do with Win32::OLE. Notice that your strings are in double quotes. This means that, for instance, $sNewFile eq 'D:~older~omefile.txt' where the ~s represent strange unprintable characters. Use single quotes, forward slashes, or double backslashes.