Listing of Directory in a checkboxed tree srtucture - c#

Is it possible to create a tree-structured Directory listing having checkbox, so that we can select that directory and get that value back..
This needs to be done in c# web application.

Here is your answer
http://forums.asp.net/p/1021570/1387710.aspx

Related

Searching for a specific file inside Azure File Storage

I have some performance issues while trying to get specific files from Azure Storage.
We have the following folder tree inside Azure:
In the folder Week there is a file. I would like to get on one call precise file based on Location, Year and Week. Currently there is a working solution but it isn't efficient. It is looking recursively through folder tree.
Does anyone has a better solution ?

Listing file in location

I'm a little stuck, as for this moment i don't have any code only an idea.
I was thinking to make a program in asp.net to list files within a location.
The file will probably be releases for programs and mods for gaming and stuff.
But i have searched everywhere to get files in a location. I could use system.io.fileinfo to list files in a directory.
But how to I get a Directory not in the solution but somehwere on the hard drive or even external storage server? The location i prefer not to be hard coded but selected by the user? any toughts on how a user can select a 'location' ?
In a console application, you could be doing something like this :
Ask for the path from the user with a readline.
Check if the path is correct / exists. (if not you could create it or display an error, also it could be a path with a file, you need to check if the path is to a directory or to a file)
Do the display of the files inside of the directory as intended.
We need more precisions if you want a better answer.

How to display a queried list of file and folder paths on a windows explorer display on C# .net framework?

How to convert a queried list of file and folder paths a windows explorer display (which shows all path and date modified and can be right clicked and double clicked) on C# .net framework?
For example; imagine that there is a list of file and folder paths. Right now I think that those paths should be displayed on a "web browser" (in C# tool box)
For an example, this is already done with this software.
If I understand the question correctly, you have to declare a class which will have have properties to keep the value of FileName, FilePath, Size and DateModified. The collection of file will provide the file attributes which then can be iterated as a list and assigned those values to the properties as defined in that class.

c# FileBrowse changes path for the rest of my application

i have created a form with FileBrowse control to load a file from.
the problem is, after i load a file the application looks for files in the path i'v selected instead of the 'Debug' directory (where files should be...)
how can i avoid it ? is it normal behavior ?
You can avoid it by not relying on the current directory being anything. Just consider what happens if you create a shortuct to your application, and change the startup directory.
If you want the directory where the application is why do you look for the current directory? You can get the directory of the application with the following:
Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)
If this is a Windows Forms application, you can get it much easier:
Application.StartupPath
Answered Here: Why does OpenFileDialog change my working directory?
And Here: Why the current working directory changes when use the Open file dialog in Windows XP ?
This beahviour is part of Windows Common Controls (OpenFileDialog) and has nothing to do with your application configuration.
However, you can set the initial directory in your application.
Check the control for a property called RestoreDirectory. Is this set to True? If yes, try it as false.

Identify "Forms" folder in a Sharepoint document library

I'm working on an application that shows a listing of files and folders within a Sharepoint document library. The file/folder list is created based on the SPList's RootFolder.SubFolders and .Files collections.
Is there a way to filter out the "Forms" folder from the results, without hard-coding a check for a folder called forms?
You could check if the folder does not have an associated list item, i.e. if SPFolder.Item is null. Otherwise, hard-coding the name "Forms" should be ok as this does not change across different language versions of SharePoint.

Categories

Resources