Skip to main content

Questions tagged [glob]

globs, more properly called [shell] patterns, and also known as wildcard expressions, are instances of a pattern-matching language used in many, esp. POSIX-like shells, to match filenames and strings: e.g., *.c is a glob for C source files and matches any file whose suffix (extension) is .c

0 votes
0 answers
10 views

File pattern in NW.js: package.json not found in srcDir file glob patterns

My source folder is /dist, and I want to run a NW.js script in /tool/nw.js. Why does it throw the glob pattern error about not finding the srcDir (/dist) folder? It works when using glob:false in the ...
RedGiant's user avatar
  • 4,714
0 votes
0 answers
44 views

Trying to list files in sub directory using CMake

I am trying to list files in subdirectory with a specific pattern using CMake... function(ListFilesInSubmodule directory_path pattern) if(DEFINED WIN32) execute_process(COMMAND powershell -...
Zorono's user avatar
  • 75
0 votes
0 answers
28 views

tsconfig.json glob patterns e.g "**/*.{ts,js}" do not work. Is this a bug or expected behaviour?

Why doesn't this work? This glob pattern works for build tools like ESLint, but with TypeScript it fails to resolve the files. // ❌ Doesn't detect files // tsconfig.a.json "include": [ &...
Habib Osaye's user avatar
1 vote
2 answers
89 views

How to efficiently perform parallel file search using pathlib `glob` in Python for large directory structures?

I'm working on a Python project where I need to search for specific files across a very large directory structure. Currently, I'm using the glob (or rglob) method from the pathlib module, but it is ...
Roy's user avatar
  • 583
0 votes
1 answer
51 views

How can I combine multiple CSV files into one Excel worksheet using Python?

I am trying to combine multiple CSV files into an Excel worksheet so I can analyse my data. So far I have been able to create the worksheet with the names of the CSV files as the tabs, but in the ...
user3482176's user avatar
1 vote
2 answers
68 views

Powershell & bash: get all files matching a directory in the path and file name

I'm looking to operate on all the files in a directory I have that are within some directory (e.g. .../bin/.../myfile.txt), where each ... can be any number of directories deep. In nu shell, I can do ...
MLavrentyev's user avatar
  • 1,949
1 vote
0 answers
12 views

HTMLGlob template pattern matching with nested subdirectories

I am working on a golang project using gin and go templating. My templates are in a structure like so: C:. ├───components ├───display .... I would like to add subdirectories to organise the templates,...
ancient geek's user avatar
-2 votes
1 answer
55 views

My code only works on one image file the rest of the image files are read and saved but untouched by my code I need my code to work on all image files

I'm new to Python. I'm using Glob to Batch Process multiple image files. When I run my code, it processes and saves all image files as it should, but only one image file is affected by my code all ...
Mark's user avatar
  • 9
0 votes
1 answer
50 views

Define input files for snakemake using glob

I am building a snakemake pipeline for some bioinformatics analyses, and I'm a beginner with the tool. The end users will be mainly biologists with little to no IT training, so I'm trying to make it ...
Whitehot's user avatar
  • 475
2 votes
1 answer
90 views

How to use windows_expand_args with single command click program

I have a Python program and am using Click to process the command line. I have a single command program, as in the example below. On Windows I would like to pass in a valid glob expression like *.py ...
Brad Campbell's user avatar
1 vote
2 answers
75 views

Regular expression for filename consisting of word, then number, then extension

I got unexpected results using this simple regular expression. Say the current directory contains the following files: foo.txt foo1.txt foo2.txt foo123.txt foo1_bar.txt I would like to list all files ...
M.M's user avatar
  • 140k
1 vote
3 answers
46 views

How to exclude file less than x kB from a group read by glob

I think it's very simple but I can't figure it out. In a python program to plot science meteo data I need to exclude some file of a list of text file. I have hundred of file downloaded from a ...
BenjiBoy's user avatar
  • 185
1 vote
1 answer
90 views

How can I exclude the base directory from a recursive glob in Python?

When using glob.glob("D:/TEST/*"), we don't get D:/TEST/ in the result. With glob.glob("D:/TEST/**"), idem. But when doing glob.glob("D:/TEST/**", recursive=True) we get ...
Basj's user avatar
  • 45.1k
0 votes
2 answers
33 views

Moving specific excel files from one folder to another based on the name of the file using Python

Context is thus: I'm doing a data science project to investigate some UK national police data. I have a folder containing ~4500 excel files - see photo below. I wish to move the ones which have '...
Thomas Mckillen's user avatar
0 votes
0 answers
30 views

Why is my glob pattern matching the README file in "files to include" in Visual Studio Code?

I'm using the Visual Studio Code IDE, the search functionality allows you to specify file name, and also "files to include". The "files to include" accepts glob patterns. I'm ...
Xavier Lint's user avatar

15 30 50 per page
1
2 3 4 5
216