|
I am trying to put a filter on my C# openFileDialog that excludes certain file extensions. For example I want it to show all files in a directory that are not .txt files.
Is there a way to do this?
Started by ZGray on
, 7 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
(System.IO.Path.GetExtension() and Linq's .Distint through these ....
You could however implement a delegate for the FileOk event on the dialog.) Uniquely identify the extensions on those files.
extensions from file dialogs.
|
|
I have lots of directories filled with a bunch of TeX documents. So, there's lots of files with the same base filename and different extensions. Only one of them, though, is editable. I'd like a way to convince Emacs that if I'm in a directory where I...
Started by Charles Pence on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
However, this will mean that emacs always ignores things like ".log" and ".pdf-implement the function file....
extensions) (find-file-limit-choices t)) ad-do-it)) (defadvice minibuffer-complete (around minibuffer-ignored-extensions".
|
|
Is there some way to get a distinct list of file extensions on all drives in my system?
Started by tbone on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Path); } catch (UnauthorizedAccessException) { } if (files != null) { foreach (string file in files) { var fi = new FileInfo(file); if (extenstions.ContainsKey(fi.Extension)) { extenstions.
|
Ask your Facebook Friends
|
Currently if I supply no extensions to the class it allows no extensions. I would like to allow all extensions. Is there any way to do this without hacking the core?
Started by Click Upvote on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Code Igniter will include this file instead whenever you load.
Logic to that Upload.php file.
|
|
How to exclude certain file type when getting files from a directory?
I tried
var files = Directory.GetFiles(jobDir);
But it seems that this function can only choose the file types you want to include, not exclude.
Started by Ngu Soon Hui on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You have to do it manually, like:
string[] files = Directory.GetFiles(myDir); foreach(string fileName in files) { DoSomething(fileName); }
I guess you can use lamda expression
var ....
Afaik there is no way to specify the exclude patterns .
|
|
This is a question regarding Unix shell scripting (any shell), but any other "standard" scripting language solution would also be appreciated:
I have a directory full of files where the filenames are hash values like this:
fd73d0cf8ee68073dce270cf7e77...
Started by Palmin on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
I'd suggest you write a script that takes the output of fileYou can use... .
You can find list of MIME-types and suggested file extensions on the net and suggested file extensions on the net.
And then append an extension.
|
|
I have notice that stackoverflow.com does not have file extensions on their pages. How would I do this with an aspx web site?
Started by x13 on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
MVC
They use MVC
Here's a great article from Scott Guthrie... .
They're using URL rewrite rules to convert the URL to a database query and feed the output back to a specified page (whose URL isn't displayed) .
The URLs aren't actually pointing to files.
|
|
Possible Duplicate:
Good free software that will join .001 files?
There are files on sites like rapidshare which have extensions like .001, .002, .003? They seem to be split by some tool. Which tool can be used to merge these files?
Started by Tony_Henrich on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at superuser):
If the file has been split on the byte level compression / split fileset....
Rar and zip files often come as multi-part archives which need unarchiving by a suitable utility (WinRar, 7-zip etc.).
It depends what kind of file they are.
|
|
On a Linux machine I would like to traverse a folder hierarchy and get a list of all of the distinct file extensions within it.
What would be the best way to achieve this from a shell?
Started by GloryFish on
, 6 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
-type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u
It work as following:
Find all files from current folder Prints extension of files if any Make a unique sorted....
Try this (not sure if it's the best way, but it works):
find .
|
|
I've noticed that a lot of the popular sites do a good job in hiding their file extensions.
I guess with the MVC concept, you're really not working with files but more so with views.
I get that, but what are other motivations?
Started by Floetic on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Exposing file extensions can be a huge maintenance headache, It's obvious I can hack this URL: http://stackoverflow.com/questions/1675131/hiding-file-extensions to http site and they can see....
Pretty URLs people can remember.
|