refuses to open file
rbtwms at paradiseca.com
rbtwms at paradiseca.com
Tue Apr 16 18:41:59 PDT 2013
I wrote a program and had it working fine, Then made a change so I could
change the file name from the command line. Now the progrram refuses to
open the file.
File efile;
writefln("command line %s", args[]);
if(args.length == 3) {
type = to!int( args[1] );
// writefln("args[2] is: %s",args[2]);
}
if (args.length == 2){
efile = File(args[2]);
}
if (args.length == 1){
efile = File("key"); // I moved file to dir the program is in
}
orignal just had a line efile = File("l:\\mvammach\\key");
command line ["eqipfile"]
std.exception.ErrnoException at std\stdio.d(289): Cannot open file ` KEY ' in
mode `rb' (No such file or directory)
----------------
0x0041B4B8
0x0041B343
0x00411E57
0x0040BB38
0x0040BB72
0x0040B794
0x00422B2D
0x750233AA in BaseThreadInitThunk
0x77369EF2 in RtlInitializeExceptionChain
0x77369EC5 in RtlInitializeExceptionChain
----------------
Volume in drive C is OS
Volume Serial Number is E221-AB60
Directory of C:\D\projects\equipment
04/16/2013 04:41 PM <DIR> .
04/16/2013 04:41 PM <DIR> ..
04/13/2013 06:39 PM 17,764 eqip.txt
04/14/2013 03:26 PM 1,650 eqipfile.bak
04/16/2013 04:44 PM 2,469 eqipfile.d
04/16/2013 04:40 PM 265,244 eqipfile.exe
04/16/2013 04:40 PM 120,600 eqipfile.obj
04/16/2013 04:41 PM 369 error.txt
01/04/2013 10:04 AM 1,909,000 KEY
04/16/2013 04:22 PM <DIR> mvammach
7 File(s) 2,317,096 bytes
3 Dir(s) 896,994,713,600 bytes free
can anybody help with this?
More information about the Digitalmars-d-learn
mailing list