Files not found issues

Josh moonburntm at gmail.com
Sun Sep 8 23:35:39 PDT 2013


On Thursday, 22 August 2013 at 04:18:34 UTC, Josh wrote:
> Windows 7, DMD 2.062
>
> I was trying to use std.file.copy, and I kept getting a 
> FileException because it couldn't find the file, even though I 
> triple checked the name and that it existed in Explorer. So I 
> did a little test to illustrate my point, and this is what 
> happened:
>
> foreach (de; dirEntries("C:\\Windows\\System32", "msvcrt*", 
> SpanMode.shallow))
> 	writeln(de);
> stdout.flush();
> system("dir C:\\Windows\\System32 | find \"msvcrt\"");
>
> produced
>
> C:\Windows\System32\msvcrt.dll
> C:\Windows\System32\msvcrt20.dll
> C:\Windows\System32\msvcrt40.dll
> 16/12/2011  05:52 PM           690,688 msvcrt.dll
> 14/07/2009  11:15 AM           253,952 msvcrt20.dll
> 14/07/2009  11:07 AM            60,928 msvcrt40.dll
>
> whereas running this in cmd:
>
> dir C:\Windows\System32 | find "msvcrt"
>
> produced
>
> 16/12/2011  06:46 PM           634,880 msvcrt.dll
> 16/12/2011  06:46 PM           634,880 msvcrt21.dll
>
> msvcrt21.dll I created by copying msvcrt.dll. I also can't find 
> msvcrt20/40.dll inside Explorer. Is there any reason why these 
> don't show the same results?
>
> Thanks,
> Josh

Anybody know what's happening?


More information about the Digitalmars-d-learn mailing list