Extract attachments from mssql

I've got a table in a mssql database that stores attachemnts of varying filetypes (.pdf, .doc, .ppt, .msg).  I need to extract all of these files out of the database and into a folder on my hard drive.  I'm running SQL Server 2008 Enterprise Edition.  

I was looking to avoid writing code, but I dont' seem to be having much luck finding an app that will do this for me.  Anyone know of an app that work, or have a coding solution?  
Here's the makup of the table:

CREATE TABLE [dbo].[FileSystem](
      [AttachmentID] [uniqueidentifier] ROWGUIDCOL  NOT NULL,
      [FileData] [image] NULL,
      [DataTypeColumn] [varchar](4) NULL,
 CONSTRAINT [PK_FileSystem] PRIMARY KEY CLUSTERED
(
      [AttachmentID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
moore315Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RiteshShahCommented:
I have one example in my blog,

"Image store in database and retrieve it back"

http://www.sqlhub.com/2009/03/image-store-in-sql-server-2005-database.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Om PrakashCommented:
You can write .NET code to retreive image and store.

Example to read image from DB
http://authors.aspalliance.com/das/readimage.aspx
You can modify this code to save image in a specific folder.
0
Marten RuneSQL Expert/Infrastructure ArchitectCommented:
If you dont use .NET and prefere a VBScript. I can provide with one!

But I need to understand  [DataTypeColumn] , is this file suffix? i e '.JPG' or '.ZIP' etc in order to customize the code for you.

And where is your filename??? Does it matter or is it not stored in the database?

//Marten
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.