Click to See Complete Forum and Search --> : Help Needed
TheDocta
August 21st, 2006, 02:37 PM
I am looking for 2 codes that I am having great difficulty finding and hoping that you guys would be able to help
the first code that I need is a piece of code that sorts by date, you enter a date and time and it will sort the files
the second piece of code that is needed is code that generates a tree view of the files
thanks for the help
-TheDocta
p.s. please dont hate me if I typed something incorrectly I am new here and trying to get used to it thanks
thelinuxduck
August 21st, 2006, 02:54 PM
With respect, it sounds as though you want someone else to do all your work for you. What have you tried? What specific things are you having problems with? Can you post code examples of what you have (in [code] [/code] tags, please)?
TheDocta
August 21st, 2006, 02:58 PM
With respect, it sounds as though you want someone else to do all your work for you. What have you tried? What specific things are you having problems with? Can you post code examples of what you have (in tags, please)?
Im not looking for someone to do the codeing for me, it just seems like it is a common code that people would most likely have so I figured that someone would know where to get it on the internet as a lot of code can be found there, I dont want someone to do the work for me I just want to know if it is already out there so i can save myself the time
thelinuxduck
August 21st, 2006, 03:19 PM
I am looking for 2 codes
What do you mean by 'codes'? Libraries? User Controls? Classes? Methods?
the first code that I need is a piece of code that sorts by date, you enter a date and time and it will sort the files
How do "you enter a date and time"? Via a popup dialog? In the code itself? Telepathy?
Sort what files? How are they loaded/stored? Sorted by creation date? Access date? Date of some data from within the file?
the second piece of code that is needed is code that generates a tree view of the files
I seriously doubt you spent any time searching. I googled for 'tree view "c sharp" and pulled up a great number of hits with very relevant information.
Again, I ask, where is your code that you're having problems with? Show where you're getting stuck. What are the errors? You've come in here and asked a question with almost no information or details, let alone things you've tried.
I mean no disrespect to you, but if you want someone to help you, you need to show that you're trying. If it appears that you're not even trying to solve the problem, you can expect a reply like mine.
Fishdawg65
August 21st, 2006, 03:40 PM
DirectoryInfo object info (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemIODirectoryInfoClassTopic.asp)
FileInfo object info (http://msdn2.microsoft.com/en-us/library/system.io.fileinfo.aspx)
Use this code to get the directory into FileInfo objects.
DirectoryInfo di = new DirectoryInfo(path);
FileInfo[] fi = di.GetFiles();
Read from the links below to get how to sort stuff. You can find this information easily enough by going to google and searching. Here's the google link:
Google search (http://www.google.com/search?hl=en&lr=&q=C%23+FileInfo+Date+Time&btnG=Search)
FileInfo Sort 1 (http://www.shanebauer.com/Weblog/CommentView,guid,b9cd286d-e147-4a25-aa49-bde888a11433.aspx)
FileInfo Sort 2 (http://geekswithblogs.net/ntsmith/archive/2006/08/17/88250.aspx)
aniskhan
August 22nd, 2006, 05:58 AM
the second piece of code that is needed is code that generates a tree view of the files
Sample
TheDocta
August 22nd, 2006, 12:18 PM
thank you gentleman,
with your help i think I have found what i need to complete the task at hand
i found how google was searched interesting because my search tries were much more basic but i now see that your way was a lot better
Thank you for all the help
-TheDocta
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.