Question on finding files in a directory

  • Thread starter Thread starter BillG
  • Start date Start date
B

BillG

My client wants to store membership cards in a directory scanned in as pdf
files. The files would be named with the following convention, 9 digit SSN
followed by a dash and then the lastname plus first initial. In my app,
when the user is sitting on a specific members record, I want them to have
the ability to push a button to display the membership card. I know the SSN
of the record they are sitting on.

Is there a way to do a search in a directory for a file that has the first 8
characters of the filename the same as the SSN of the record that the user
is on and grab the entire filename and pass it to adobe reader?

Bill
 
My client wants to store membership cards in a directory scanned in as pdf
files. The files would be named with the following convention, 9 digit
SSN followed by a dash and then the lastname plus first initial. In my
app, when the user is sitting on a specific members record, I want them to
have the ability to push a button to display the membership card. I know
the SSN of the record they are sitting on.

Is there a way to do a search in a directory for a file that has the first
8 characters of the filename the same as the SSN of the record that the
user is on and grab the entire filename and pass it to adobe reader?

Bill

It could be done by grabbing an array of all the files:

DirectoryInfo di = new DirectoryInfo(directoryPath);
FileInfo[] files = di.GetFiles();

Then:

foreach(FileInfo current in files)
{
if(current.Name.StartsWith(SSN))
{
DisplayCard(current.FullName);
break;
}
}

I don't know how that would scale though.
 
However, I am very scared of my SSN just showing as plain text as file name,
associated with my name(!!!), even it is only on a server.
Just how casual some IT guys handle very sensitive private information!

Jeff Gaines said:
My client wants to store membership cards in a directory scanned in as pdf
files. The files would be named with the following convention, 9 digit
SSN followed by a dash and then the lastname plus first initial. In my
app, when the user is sitting on a specific members record, I want them to
have the ability to push a button to display the membership card. I know
the SSN of the record they are sitting on.

Is there a way to do a search in a directory for a file that has the first
8 characters of the filename the same as the SSN of the record that the
user is on and grab the entire filename and pass it to adobe reader?

Bill

It could be done by grabbing an array of all the files:

DirectoryInfo di = new DirectoryInfo(directoryPath);
FileInfo[] files = di.GetFiles();

Then:

foreach(FileInfo current in files)
{
if(current.Name.StartsWith(SSN))
{
DisplayCard(current.FullName);
break;
}
}

I don't know how that would scale though.
 
However, I am very scared of my SSN just showing as plain text as file
name, associated with my name(!!!), even it is only on a server.
Just how casual some IT guys handle very sensitive private information!

In the UK you can pick up laptops/CD's/memory sticks full of sensitive
information from pretty well any train you travel on :-(
 
Yeah, especially the US SSN which is the equivalent of your personal
GUID.

I know this is off topic however...

Which you end up giving to 100's of people anyway. SSN is a really bad
security problem because of the way it is handled now.

Have you noticed the three digit confirmation number is being asked
everywhere now. How long before that becomes so useless as a
confirmation id. Why does paypal need it, surely the card number is
enough with active communication with the banks on fraud alerts.

Ken
 
Back
Top