in reply to Directory checking on Windows XP
>md dir >copy nul file 1 file(s) copied. >perl -le"if (-d $ARGV[0]) { print 'dir' } else { print 'not' }" dir dir >perl -le"if (-d $ARGV[0]) { print 'dir' } else { print 'not' }" file not
I could see the opposite (always getting the else part) due to being in a different working directory than you think you are, having trailing whitespace in your file name or attempting to use wide file names.
Update: Oops, I read it backwards. You are getting the else part.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Directory checking on Windows XP
by ack (Deacon) on Sep 22, 2008 at 05:43 UTC | |
by ikegami (Patriarch) on Sep 22, 2008 at 05:55 UTC |