CMD does and doesn't see this file?

5

I'm having a lot of problems with a particular file, LockupSystem.MDB . It doesn't help that there are lots of files with similar names.

I tried to dir to find the file but I couldn't find it. After a while I tried piping it through find with no better luck before trying dir for the file directly.

Here's what's happening: dir for the file directly? No problem! DIR all files? Doesn't show up!

Screenshot

  1. What's happening here?
  2. Is there a problem with this file? I think my program is saying either this file doesn't exist or it can't access it.

rlb.usa

Posted 2012-01-18T23:58:38.737

Reputation: 1 430

barlop's answer sounds likely to be the case. The file is hidden. What bothers me is your second point -- what is the error your program is returning? Assuming the file is actually hidden, your application should still be able to read the file. Hidden just means it won't return in a directory listing (or in Windows Explorer). Maybe the file is not in that directory? – shufler – 2012-01-19T00:12:50.823

Answers

4

Find is a case-sensitive search

lockupsystem (the actual basename of the file as you can see reported by the dir command) is not the same as LockupSystem (what you asked find to scan for).

Nothing is saying that the file doesn't exist. Nor is there any mystery with hidden attributes and whatnot. (The first dir command in the question wouldn't have shown the file in the first place if that had been the case.) It's very simple: You didn't spell your command-line correctly.

Spell the name of what you are looking for correctly in the find command. Or use find's case-insensitivity option.

JdeBP

Posted 2012-01-18T23:58:38.737

Reputation: 23 855

Yup; add the /i switch to the find command and it should work. – Synetech – 2013-02-18T00:35:19.490