Questions tagged [filepattern]

25 questions
217
votes
13 answers

Recursively add files by pattern

How do I recursively add files by a pattern (or glob) located in different directories? For example, I'd like to add A/B/C/foo.java and D/E/F/bar.java (and several other java files) with one command: git add '*.java' Unfortunately, that doesn't…
Michel Krämer
  • 14,197
  • 5
  • 32
  • 32
13
votes
10 answers

GIT: I want to unstage all files matching a certain pattern

I would like to run git reset *.foo but this errors out. I think I need to use a pipe, but I'm not sure how to do this. Thanks!
Jacko
  • 12,665
  • 18
  • 75
  • 126
13
votes
4 answers

IntelliJ File mask not working on simple excluding file pattern! Why?

Follows this page https://www.jetbrains.com/help/pycharm/2016.1/find-and-replace-in-path.html?origin=old_help#mask , it should be able to exclude many files using "!" symbol in front of the regular pattern like: *.java, when doing text search inside…
Tim Long
  • 2,039
  • 1
  • 22
  • 25
13
votes
4 answers

How can I make GetFiles() exclude files with extensions that start with the search extension?

I am using the following line to return specific files... FileInfo file in nodeDirInfo.GetFiles("*.sbs", option) But there are other files in the directory with the extension .sbsar, and it is getting them, too. How can I differentiate between .sbs…
topofsteel
  • 1,267
  • 6
  • 16
  • 25
5
votes
2 answers

Filename globbing Windows vs. Unix

Is something like this possible in the Windows standard shell using wildcards only? $ ls -1 003[5,8]0 00350 00380
lukuluku
  • 4,344
  • 3
  • 30
  • 35
4
votes
4 answers

How do I loop over all Assets folders and sub folders and get to a list all the prefabs in this folders?

This code get all the sub folders in a Assets specific folder. using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using UnityEditor; using UnityEngine; public class AddComponents :…
4
votes
1 answer

WildcardPatternSuite finds no classes

I'm trying to use the WildcardPatternSuite from junit-toolbox, but the testsuite fails with java.lang.Exception: failed to scan C:\Users\ms\workspaces\comet4\PubServerTests\build\com\priint\pubserver\tests\testsuites using wildcard patterns…
Martin Schröder
  • 4,176
  • 7
  • 47
  • 81
3
votes
2 answers

What means tilde in windows file pattern

I have pattern to search. Say "*.txt". Now I have some files I do not want to list there. I believe they do not match this pattern. But on windows, they do. I know tilde character is used to make short form of legacy 8.3 filename. That is…
Pihhan
  • 813
  • 5
  • 11
2
votes
2 answers

Java recursively list the files from directory of specific pattern

I've below directory/file structure ABC -- Apps -- Tests -- file1.xml -- file2.xml -- AggTests -- UnitTests PQR -- Apps -- Tests -- file3.xml -- file4.xml -- AggTests -- UnitTests Here I just want to a List of…
Swapnil Kotwal
  • 5,418
  • 6
  • 48
  • 92
2
votes
1 answer

How do I get mocha to execute tests in all subfolders recursively?

I have my tests grouped in folders, like this: test/ ├── unit/ ├── integration/ └── acceptance/ In each of the above folders, there are a number of test files (e.g. test.js) I execute my different test suites with the following commands: mocha…
Erik B
  • 40,889
  • 25
  • 119
  • 135
2
votes
0 answers

.prefs file pattern in android studio

I am very very new to Android Studio and coding in general. I'm working on a project that involves me moving open sourced code to android studio emulator. However, one of the folders that needs to be moved over is the .settings folder. It contains a…
2
votes
1 answer

How to set a variable in a Makefile to a filename via a file pattern, only if the pattern has ONE match

I have a makefile for GNU make to build documents from markdown text files. The makefile has a variable INPUT I want to set to the filename of the markdown file. All markdown files follow the pattern *.md. However I want set INPUT only to the…
halloleo
  • 9,216
  • 13
  • 64
  • 122
1
vote
1 answer

How to set up SFTPSensor in Airflow to react on any file appearing on the server?

I am pretty new to Airflow. I am trying to set up SFTPSensor to look on the folder on the SFTP server for any file appear. It sounds for me like a regular expression "*" in the file_pattern property: import airflow import logging from airflow import…
Nadia
  • 99
  • 6
1
vote
1 answer

How can I determine which file filter was matched for a FileSystemWatcher event?

I am using a FileSystemWatcher as follows: using watcher = new FileSystemWatcher(@"C:\path\to\folder"); watcher.NotifyFilter = NotifyFilters.Attributes | NotifyFilters.CreationTime |…
1
vote
2 answers

Delete files with pattern in remote SFTP directory

I need to delete files matching some pattern (name containing a specific string) from a remote directory on an SFTP server using PS.
ITE
  • 67
  • 7
1
2