Questions tagged [file-search]

This tag can refer to the process of searching a system for a specific file or the process of searching the contents of a file for specific keywords.

This tag can refer to

  1. The process of searching a system for a specific file.

  2. The process of searching the contents of a file for specific keywords.

179 questions
5
votes
3 answers

Update progress bar while iterating file structure

I use this function, to search for all exe files in selected directory: public static IEnumerable GetFiles(string root, string searchPattern) { Stack pending = new Stack(); pending.Push(root); while (pending.Count…
user1775334
  • 131
  • 1
  • 1
  • 6
4
votes
3 answers

How to use DirectoryInfo.GetFiles and have it stop after finding the first match?

Need to search the directory/sub-directories to find a file, would prefer it to stop once it has found one. Is this a feature built into DirectoryInfo.GetFiles that I am missing, or should I be using something else (self-implemented recursive…
RiddlerDev
  • 7,013
  • 5
  • 40
  • 60
4
votes
3 answers

How can I find the newest .pl file in a directory and all its subdirectories using Perl?

How can I scan an entire directory's contents, including its subdirectories' contents, and find the newest .pl file within them using Perl? I want to build a sorted array/list of the full file paths of all .pl files within a directory tree. So, for…
CheeseConQueso
  • 5,493
  • 25
  • 84
  • 126
4
votes
1 answer

How to get the last modified file in a directory using VBA in Excel 2010

Im looking for a way to do this in Excel 2010 using VBA. It used to be possible in Excel 2003 using the Application.FileSearch method, but this has be depreciated. (see below) Dim sFileName As String sFileName = "" With Application.FileSearch …
Irfy
  • 2,370
  • 3
  • 23
  • 30
4
votes
1 answer

What makes Everything's file search and index so efficient?

Everything is a file searching program. As its author hasn't released the source code, I am wondering how it works. How could it index files so efficiently? What data structures does it use for file searching? How can its file searching be so…
Sraw
  • 14,837
  • 5
  • 37
  • 62
4
votes
1 answer

Searching for the change history of partial file or path in Mercurial or TortoiseHg

Each time I need anything beyond the standard search, I find myself trying several things, searching Google and in the end terribly failing. Apparently, the Hg search syntax is pretty extensive and I would like to use its power, but I don't seem to…
Abel
  • 52,738
  • 19
  • 137
  • 227
4
votes
3 answers

tcl deep recursive file search, search for files with *.c extension

Using an old answer to search for a file in tcl: https://stackoverflow.com/a/435094/984975 First lets discuss what I am doing right now: Using this function:(credit to Jacson) # findFiles # basedir - the directory to start looking in # pattern - A…
AturSams
  • 6,416
  • 14
  • 53
  • 91
3
votes
5 answers

Recursive file search using C++ MFC?

What is the cleanest way to recursively search for files using C++ and MFC? EDIT: Do any of these solutions offer the ability to use multiple filters through one pass? I guess with CFileFind I could filter on *.* and then write custom code to…
jacobsee
  • 1,286
  • 4
  • 16
  • 30
3
votes
1 answer

Erlang - search for a specific string within an external file and append file if not present

I want to check if a specific string is present in a external file,by reading the file line by line using erlang. If the specific string is not present ,I wish to append the file with the string. So far I have managed to open the file and read the…
3
votes
0 answers

How to exclude a directory from search when using Python rglob?

Here is the code: # Now create libraries for any asys Simulation Models that are present in the module asysdir = moduleRootDir / asys_sys_tail asys_systems = [] if asysdir.is_dir(): asys_systems = [x for x in asysdir.iterdir() if …
Quantum0xE7
  • 282
  • 2
  • 9
3
votes
2 answers

Google Drive API v3 (C# .NET) searching folders/files by title throws RequestError Invalid Value [400]

I am trying to upload a file to Google Drive to a specific folder. Since I need the ID of the folder (not just the name) to set the upload destination (file's parent) I try to search for it by name and get the first returned file's ID from the query…
3
votes
1 answer

How to perform a case-insensitive file search in Erlang/Elixir

Elixir provides Path.wildcard, which uses the Erlang :filelib.wildcard function internally. Matching is case-sensitive, for example, "a" does not match "A". (http://erlang.org/doc/man/filelib.html#wildcard-1) Please is there a case-insensitive…
Charles Okwuagwu
  • 9,055
  • 12
  • 67
  • 131
3
votes
3 answers

Recursive File Search in VB.NET

I have a function that does a recursive directory search for files but when I search a Drive I get Access denied errors which stops the search. How can I avoid these errors? Here's the function I use: lstSearch =…
NPS
  • 31
  • 1
  • 5
3
votes
6 answers

find specific file type from folder and its sub folder

I am writing a method to get specific file type such as pdf or txt from folders and subfolders but I am lacking to solve this problem. here is my code // .............list file File directory = new File(directoryName); // get all the…
user2614607
  • 113
  • 2
  • 6
  • 17
2
votes
2 answers

Having trouble with GREP and REGEX

I have a text file that stores combinations of four numbers in the following format: Num1,Num2,Num3,Num4 Num5,Num6,Num7,Num8 ............. I have a whole bunch of such files and what I need is to grep for all filenames that contains the pattern…
sc_ray
  • 7,385
  • 9
  • 59
  • 94
1
2
3
11 12