C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 11th, 2005, 08:34 AM
emotional_robot emotional_robot is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 59 emotional_robot User rank is Sergeant Major (2000 - 5000 Reputation Level)emotional_robot User rank is Sergeant Major (2000 - 5000 Reputation Level)emotional_robot User rank is Sergeant Major (2000 - 5000 Reputation Level)emotional_robot User rank is Sergeant Major (2000 - 5000 Reputation Level)emotional_robot User rank is Sergeant Major (2000 - 5000 Reputation Level)emotional_robot User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 22 h 37 m 43 sec
Reputation Power: 38
Send a message via Yahoo to emotional_robot
Smile how to find out types of files in Directory

Hi all,
Is there any utility which can tell me the types of files in a directory..
Or any C source code or any exe will work..
I posted this here coz C programmers are good at all this
things..

Once I was also a C Programmer but now I am hitting head at Java .

Reply With Quote
  #2  
Old November 11th, 2005, 09:03 AM
brifanz brifanz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 81 brifanz User rank is Private First Class (20 - 50 Reputation Level)brifanz User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 23 h 35 m 39 sec
Reputation Power: 10
Hello there.

Can you be more specific...?

Are you referring to file attributes(hidden, system, etc...) or are you trying to find what's the associated process(word, excel, etc...) for a given file type?

If you want the attributes you can use the FindFirstFile and FindNextFile functions to retrieve the files and it's attributes.
Be aware that a folder is a special kind of file, thus it is retrieved as a files from the above functions.

In the other case you need to use the registry to find what is any process(application) attached to a given file type(by the way I think that's how Explorer gets the icons from the applications).

Hope this helps...

Reply With Quote
  #3  
Old November 11th, 2005, 10:49 AM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,345 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 39 m 18 sec
Reputation Power: 55
stat() is a portable call that will determine file types as well.

Associations are part of the Win API callled Shell Programming - starting with SHGetFileInfo and FindExecutable

Last edited by jim mcnamara : November 11th, 2005 at 10:56 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > how to find out types of files in Directory

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap