How to retrieve File Information that store in server [modified]
-
Dear, -I want to check the version of file then allow to download a updated-file automatically -I had writen a function that allows to retrieve File information using FileInfo and FileVersionInfo -It runs well if the source file 's in my local, but it was not functionly if the source file 's in the server. Ex: http://www.misplacedcomedygroup.com/rss.xml -And it also throws this exception: "URI formats are not supported." Here is my function: //function get version public static string GetFileVersion(string srcFile){ string fileVersion; try { FileVersionInfo info = FileVersionInfo.GetVersionInfo(srcFile); fileVersion = info.FileVersion; } catch (FileNotFoundException e) { throw (e); } } //function get last modify time public static string GetFileLastAccessTime(string srcFile) { string lastAccessTime; try { FileInfo file = new FileInfo(srcFile); lastAccessTime = file.LastAccessTime.ToString(); } catch (FileNotFoundException e) { throw (e); } } Thanks regards, Germanrose -- modified at 0:59 Wednesday 23rd August, 2006
-
Dear, -I want to check the version of file then allow to download a updated-file automatically -I had writen a function that allows to retrieve File information using FileInfo and FileVersionInfo -It runs well if the source file 's in my local, but it was not functionly if the source file 's in the server. Ex: http://www.misplacedcomedygroup.com/rss.xml -And it also throws this exception: "URI formats are not supported." Here is my function: //function get version public static string GetFileVersion(string srcFile){ string fileVersion; try { FileVersionInfo info = FileVersionInfo.GetVersionInfo(srcFile); fileVersion = info.FileVersion; } catch (FileNotFoundException e) { throw (e); } } //function get last modify time public static string GetFileLastAccessTime(string srcFile) { string lastAccessTime; try { FileInfo file = new FileInfo(srcFile); lastAccessTime = file.LastAccessTime.ToString(); } catch (FileNotFoundException e) { throw (e); } } Thanks regards, Germanrose -- modified at 0:59 Wednesday 23rd August, 2006
Hey, Just wondering if you still need this, basically you will have to create a webservice/php script to return the information. It should work then. Anthony
Check out my unit conversion software for Windows - Universal Converter
Free Toolbar for all your needs! - Universal Converter Toolbar