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.

189 questions
1
vote
2 answers

Efficient design to store lookup table for files in directories

Let's say I have three directories dir1, dir2 & dir3, with thousands of files in each. Each file has a unique name with no pattern. Now, given a filename, I need to find which of the three directories it's in. My first thought was to create a…
HMK
  • 578
  • 2
  • 9
  • 24
1
vote
3 answers

Python - How to search a string in a large file

I have a large file that can have strings like file_+0.txt, file_[]1.txt, file_~8.txt etc. I want to find the missing files_*.txt until a certain number. For example if I give the below file and a number 5, it should tell that the missing ones are…
SyncMaster
  • 9,754
  • 34
  • 94
  • 137
1
vote
2 answers

Android finding files on the SDCard

I'm working on a MP3 application in which I'd like to index the files on my SDCard. What is the best way to do it? My Idea. Search for files when the application is started for the first time and register a broadcast receiver for the SDCard state…
Ragunath Jawahar
  • 19,513
  • 22
  • 110
  • 155
1
vote
0 answers

Is there file search alternative to unity dash in ubuntu?

I use an old computer and unity dash in my Ubuntu 16.10 is slow and its file search is not reliable. Is there any good file search alternative for Ubuntu?
1
vote
0 answers

Fastest way to determine location of a file on a disk

I want to find a file foo.bar on a disk (in order to read that file). If I am using Windows, I can use: list.files(path = "C:/", pattern = "^foo\\.bar$", recursive = TRUE, full.names = TRUE) but this is quite slow (11 seconds on my machine) -- in…
Hugh
  • 15,521
  • 12
  • 57
  • 100
1
vote
2 answers

How to search files using batch file and get the relative file path not the full path?

I want to search files with .log extension recursively in a directory. I am trying like below command in a batch file. for /R %%A in (*.log) do echo %%A >> All_logs.txt I tried this also: for /R %%A in (*.log) do echo %%~nxA >> All_logs.txt But…
Yash
  • 173
  • 2
  • 13
1
vote
2 answers

Multiple Threads searching on same folder at same time

Currently I have a .txt file of about 170,000 jpg file names and I read them all into a List (fileNames). I want to search ONE folder (this folder has sub-folders) to check if each file in fileNames exists in this folder and if it does, copy it to a…
Alex Urrutia
  • 45
  • 1
  • 9
1
vote
3 answers

How can I programmatically use Windows File Explorer to perform a Search?

We have a folder on our network that we want to search within, including subfolders, from our program. We want to return a list of files whose name contains "String1" or "String2" or "StringN". We would prefer to programmatically open an Explorer…
Pratt Hinds
  • 225
  • 1
  • 3
  • 13
1
vote
1 answer

How do I write a custom search filter to weed out R.java files?

I'm trying to create a custom search à la How to exclude a file extension from IntelliJ IDEA search? in Android Studio. How come the following pattern doesn't exclude R.java files? Note that the second uses &&!file:R.java, yet the scope does not…
Ky -
  • 30,724
  • 51
  • 192
  • 308
1
vote
3 answers

What is the best way to search for a large number of words in a large number of files?

I have around 5000 files and I need to find words in each of them from a list of 10000 words. My current code uses a (very) long regex to do it, but it's very slow. wordlist = [...list of around 10000 english words...] filelist = [...list of around…
Daffy
  • 841
  • 9
  • 23
1
vote
0 answers

Django-haystack + Solr file search engine without django models

I'm trying to implement file search engine using django-haystack and some. I've already setup solr and able to query from solr UI. I tried to use haystack to provide file search. I've a directory containing files which gets updated regularly. I want…
Humble Learner
  • 791
  • 12
  • 26
1
vote
2 answers

Using ack/grep with globstar option for big directory tree (performance issue?)

I'd like to use globstar option '**' of bash to search files with a certain directories, as is customary is used with grep. However, the following command just started and did nothing ack PATTERN ~/projects/**/trunk/ How I can search in files with…
Loom
  • 9,768
  • 22
  • 60
  • 112
1
vote
0 answers

Aptana Studio 3.6.0 - Fuzzy File Finder

Back in the early versions of Aptana 3 we had a plugin to add fuzzy finding capability to files search. It was called Muermann GoTo File, and the shortcut was CTRL+Alt+N. We could just drop the plugin inside Aptana's plugins folder, and the fuzzy…
Mauricio Moraes
  • 7,255
  • 5
  • 39
  • 59
1
vote
1 answer

Perl File::Find::Rule to exclude a single dir

I have the below shown directory structure. I would like to get just the project names in my @project. @project=('project1','project2'); I would like to exclude OLD directory and its sub directories in @project I would like to get latest file in…
Jill448
  • 1,745
  • 10
  • 37
  • 62
1
vote
1 answer

Searching for PDF Not working in Nexus?

public void check4PDF(File dir) { String pdfPattern = ".pdf"; File listFile[] = dir.listFiles(); if (listFile != null) { for (int i = 0; i < listFile.length; i++) { if (listFile[i].isDirectory()) { …
Ashwin S Ashok
  • 3,623
  • 2
  • 29
  • 36