ter-pierre Posted April 3, 2006 Share Posted April 3, 2006 Hi guys. I needs to find (ex.) all mp3 files on my file server to remove it. My "best" users are renaming the files to prevent it to be removed. Can I check the mime type to certify the type of those files? some one knows a way to do? thanks. Pierre Link to comment Share on other sites More sharing options...
Bert Posted April 3, 2006 Share Posted April 3, 2006 Fron what you are asking for, are you trying to see what the true file type it is, even if it is renamed? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
herewasplato Posted April 3, 2006 Share Posted April 3, 2006 Hi guys.I needs to find (ex.) all mp3 files on my file server to remove it.My "best" users are renaming the files to prevent it to be removed.Can I check the mime type to certify the type of those files?some one knows a way to do?thanks.PierreI know that you are not "downloading" these files via IE, but read this anyway:Mime Sniffing- (FEATURE_MIME_SNIFFING)- This control enables checks to the signature bits of downloaded files in order to determine the file's type and render it properly.http://msdn.microsoft.com/library/default....urecontrols.aspThen take a look at:FindMimeFromData contains hard-coded tests for (currently 26) separate MIME types.....http://msdn.microsoft.com/library/default..../appendix_a.aspPerhaps Dale and the DLL gurus could put together something that would really "help" those "best" users. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Joon Posted April 3, 2006 Share Posted April 3, 2006 Hi guys.I needs to find (ex.) all mp3 files on my file server to remove it.My "best" users are renaming the files to prevent it to be removed.Can I check the mime type to certify the type of those files?some one knows a way to do?thanks.PierreI think you could be able to filter files by size, 2MB ~ 10MB, then check if file has MP3 tags. Link to comment Share on other sites More sharing options...
ter-pierre Posted April 4, 2006 Author Share Posted April 4, 2006 vollyman - Yes. Just this. herewasplato - Thank you. I will take a look. Joon - MP3 type was just an exemple. I needs to know the true file type of all files. I have the fullpathname of the file (ex. E:\TMP\XYZ.txt), and needs to know the true file type of this file. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now