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
0
votes
1 answer

How to check if folder has suboflders and then list the directories with listdir()?

I want to write a file searching code where I don't know if the directory I'm searching in has subdirectories and I want to check that so I don't get an error like this: [Error 267]The directory name is invalid: 'C:/Path/To/Directory'. I wrote a…
user7898237
0
votes
4 answers

Is there any better file search algorithm than recursion?

I have used recursion to search for particular type of file (for example .pdf files is used here). My recursion algorithm searches for all subfolder. However I found that it lacks performance when there is too many sub-folder. sub-sub-folder,…
Kangkan Lahkar
  • 267
  • 5
  • 16
0
votes
0 answers

Using glob in C++ to return files

I've been trying to play around with glob in C++ but have been having some issues... Essentially I am giving it a path and expecting to get the list of files back. Here is my code: const string path = "/home/admin/filesDir/"; glob_t glob_r; glob(…
Sharki
  • 375
  • 2
  • 14
0
votes
1 answer

Is it possible to reduce number of file numeration?

I wrote this in VB.NET, but I am comfortable with C# as well. I have a list of files that I want to find on a Windows file system. Based on the file name, I will need to look in a different directory. The list of files that I have is a list that…
Jayarikahs
  • 75
  • 11
0
votes
1 answer

Install ginac on Ubuntu 16.04 - no such file or directory

I am trying to install ginac on Ubuntu 16.04 I have installed ginac-tools from sources. However, when I copy the example given on the website into my code, it says: cannot find such file or directory (in the #include ginac line). #include…
kassio
  • 57
  • 1
  • 12
0
votes
2 answers

Performance of filter expression for matching all files : * vs. *.*

Let's say I need to provide a filter to match all files in a given filesystem, not necessarily in linux, but also for matching all files in an IDE with huge code base that supports regex based filtering. Is there any significant performance…
user6077173
0
votes
1 answer

Batch script to pick filename from a text file and find the latest file

Scenario: We have multiple releases of a product, and for each release, a folder is created in the main folder. A help file is modified in various releases. I have all the help file names listed in a text file. I need a script to: Take each file…
Lavanya
  • 1
  • 2
0
votes
1 answer

Prevent running sub routines twice for improve performance?

I have a winform that does file searching and display results in a datagridview. I also have picture boxes that display the file as well. The process: enter file name and click search, displays results in grid and pictures in picture box. I want to…
Help Man
  • 71
  • 1
  • 2
  • 10
0
votes
2 answers

Python file search program not fast enough

I wrote the following code for searching a file on your computer: import os, sys import win32api x=raw_input("Enter file name: ") drives = win32api.GetLogicalDriveStrings() drives = drives.split('\000')[:-1] for drive in drives: for…
Vin
  • 729
  • 9
  • 15
0
votes
1 answer

know the existence of files equal to a partial name + extention

I'm trying to have a filter, to see if a file exists or not, and how many are: I'm trying to pick up the script with as follows: $list = glob($filepath.$filenamePartial'*'.$ext); var_dump($list); Solved 1: $list =…
user6079755
0
votes
3 answers

Scan For Multiple File Exentions and Copy To New Dir If Found

I am using Ubuntu and I am needing to recursively search a directory and subs for any .mp4, .mkv, or .wav files. I saw that mmv may be my best solution, but I can not get the syntax correct. So how would I convert this to search for an array of…
FunFly WhiteGuy
  • 163
  • 2
  • 2
  • 11
0
votes
1 answer

Locate "chrome.exe"

I have a macro that calls Chrome, however deploying this code on different machines is undermined by the full filepath for chrome being different on each machine. To mitigate this, I wanted to execute a one-time search for "chrome.exe" and to store…
0
votes
2 answers

How to find the path of any specific file, "just like search", through python

I'm running a script and as a task I download a file(not from python: Say the user downloads a txt file from browser) and it could be downloaded anywhere by the user. In the next step I want a script to find that file and give me the path for…
user2649476
  • 53
  • 2
  • 9
0
votes
0 answers

Can we use eclipse C/C++ and File search plugin APIs in our plugin (meant for eclipse only)?

Referring to my previous question : Search-Plugin for Eclipse Now I am able to use eclipse JDT Search API in my plugin. But I am able to search in Java files only. Now I want to embed C/C++ and File search functionality to search in non-java files…
0
votes
1 answer

NTFS File-in-Directory-Search Performance

I'd like to write a cache folder to store computed data, so I don't have to recompute it every time, the same input data comes in. So I compute a hash of the input data (e.g. hash over the input file), convert it to a string of allowed characters…
azt
  • 2,100
  • 16
  • 25