Questions tagged [file-find]

41 questions
0
votes
1 answer

Is it posible to use wild card to get list of directory in File::Find perl module?

I want to list the directory path which contains the required directory. For example: /usr1 | | …
veerabhadra
  • 21
  • 1
  • 5
0
votes
1 answer

Find:File in Perl - Search through symlink directory

Does anyone know how to make File:Find can search through symlink directory? I have a real directory at /home/alex/mydir1 and a symlink directory inside /home/alex/mydir1/test -> ../mydir2 Here is my code: #!/depot/perl-5.8.3/bin/perl use…
AlexPham
  • 311
  • 2
  • 4
  • 16
0
votes
1 answer

Why did File::Find finish short of completely traversing a large directory?

A directory exists with a total of 2,153,425 items (according to Windows folder Properties). It contains .jpg and .gif image files located within a few subdirectories. The task was to move the images into a different location while querying each…
Stan
  • 113
  • 1
  • 9
0
votes
1 answer

How to find files in Perl that match prompted input without using -e and -d... File::Find only way?

Good afternoon, stackoverflow friends! I have been given the following assignment and would like to learn how to see if a file or directory exists. "Prompt the user to type in one parameter (note that this script only takes in one parameter and…
0
votes
2 answers

Perl's File::Find::Rule Amount/Quantity-Rule?

When I have a folder with about 5000 images and I use the following code: my $path= "./foo/images" my @files = File::Find::Rule->file()->name('*.jpg')->in($path); I should get 5000 Images in my Array. But are there equivalents with perl or a shell…
Robin93K
  • 198
  • 2
  • 3
  • 15
0
votes
2 answers

Optimize searching the difference between two directories recursively in perl

I am trying to find the difference between two directories in Perl. I want to optimize it to run efficiently and also not sure how to ignore certain files (say with extension .txt or .o) The code I have so far is: use strict; use warnings; use…
iDev
  • 2,163
  • 10
  • 39
  • 64
0
votes
1 answer

Need some help in program logic

I am trying to read a config file and discard the directories that are listed in there with size mentioned in the file. So far I have this- open FILE, 'C:\reports\config.txt' or die $!; my $size_req; my $path; my $sub_dir; my $count; my @lines…
-1
votes
1 answer

Select modified files using AWK

I am working on a task for which AWK is the designated tool. The task is to list files that are: modified today (same day the script is run) of size 1 MB or less (size <= 1048576 bytes) User's input is to instruct where to start search. Search for…
henrix
  • 1
  • 3
-1
votes
1 answer

Find files with certain file extensions c++

I can find .jpg files But how can I find .jpg, .bmp, .png .... files? Mask LPWSTR mask = stoL(path + "*.(jpg)"); Handler initialization HANDLE hf = FindFirstFile(mask, &FindFileData); String to LPWSTR LPWSTR stoL(string s) { return…
Vadim Volodin
  • 377
  • 1
  • 2
  • 14
-1
votes
1 answer

Modify Perl search in file to include only specified directories

I found the code sample below here. It searches for text in files, recursing through sub-directories, but I want to specify a subset of the first level of sub-directories to recurse through. E.g. suppose I'm in directory C:\ which contains…
SSilk
  • 2,433
  • 7
  • 29
  • 44
-5
votes
2 answers

perl list path of subdirectory using File::Find

How can I get all the paths of a subdirectory foo into an array in perl using File::Find abc\def\sdfg\gthrth\foo\ abc\def\fgfdg\foo\ abc\def\sdfgdsg\fgdfg\gfdgf\tytty\foo\ abc\def\foo\ I want to get the full paths of all subdirectories foo…
Jill448
  • 1,745
  • 10
  • 37
  • 62
1 2
3