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

Re: Question on finding files in a directory by Jeff

Jeff
Mon Sep 08 10:51:27 CDT 2008

On 08/09/2008 in message <#69SYvbEJHA.4420@TK2MSFTNGP06.phx.gbl> BillG
wrote:

>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.

--
Jeff Gaines Damerham Hampshire UK
All those who believe in psychokinesis raise my hand.

Re: Question on finding files in a directory by Norman

Norman
Mon Sep 08 11:44:26 CDT 2008

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" <whitedragon@newsgroups.nospam> wrote in message
news:xn0fuxs2z3ahh73001@msnews.microsoft.com...
> On 08/09/2008 in message <#69SYvbEJHA.4420@TK2MSFTNGP06.phx.gbl> BillG
> wrote:
>
>>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.
>
> --
> Jeff Gaines Damerham Hampshire UK
> All those who believe in psychokinesis raise my hand.


Re: Question on finding files in a directory by Jeff

Jeff
Mon Sep 08 11:55:59 CDT 2008

On 08/09/2008 in message <#b$MsIdEJHA.3616@TK2MSFTNGP02.phx.gbl> Norman
Yuan wrote:

>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 :-(

--
Jeff Gaines Damerham Hampshire UK
If it's not broken, mess around with it until it is

Re: Question on finding files in a directory by Bob

Bob
Mon Sep 08 12:54:41 CDT 2008

Yeah, especially the US SSN which is the equivalent of your personal GUID.


--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.


"Jeff Gaines" <whitedragon@newsgroups.nospam> wrote in message
news:xn0fuxtrv3csh5m002@msnews.microsoft.com...
> On 08/09/2008 in message <#b$MsIdEJHA.3616@TK2MSFTNGP02.phx.gbl> Norman
> Yuan wrote:
>
>>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 :-(
>
> --
> Jeff Gaines Damerham Hampshire UK
> If it's not broken, mess around with it until it is


Re: Question on finding files in a directory by Ken

Ken
Mon Sep 08 19:58:11 CDT 2008

On Mon, 08 Sep 2008 19:54:41 +0200, Bob Powell [MVP] wrote:

> 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