Search for a File Name in a folder


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Search for a File Name in a folder
# 1  
Old 07-13-2007
Search for a File Name in a folder

Hello All,

Can you please help me with this request.
I have to identify a file (having file name with perticular pattern)
with in a range.

Example:

input file name can be:
myfile2007_03
myfile2007_45
myfile2007_198
myfile2007_25
myfile2007_101


my program has to identify filename which has the suffix with in the range of 1 to 99.

it should trigger only files:
myfile2007_03
myfile2007_45
myfile2007_25


********************




Thanks in advence for your help. Smilie

S
# 2  
Old 07-13-2007
ls myfile2007_??
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Search and open a folder and file

here is the path on Macintosh: Macintosh HD/Users/shawn/Desktop/ATP/ATP14 bon bon/ATP14 bon bon.jpg I need to find the folder with ATP14 in the name, then open the folder I need to find the file whose name starts with ATP14 in the folder in 1 above I had been using this in Applescript... (1 Reply)
Discussion started by: sbrady
1 Replies

2. Shell Programming and Scripting

Recursive folder search faster than find?

I'm trying to find folders created by a propritary data aquisition software with the .aps ending--yes, I have never encountered folder with a suffix before (some files also end in .aps) and sort them by date. I need the whole path ls -dt "$dataDir"*".aps"does exactly what I want except for the... (2 Replies)
Discussion started by: Michael Stora
2 Replies

3. Shell Programming and Scripting

Need to build Shell Script to search content of a text file into a folder consist several files

Have to read one file say sourcefile containing several words and having another folder containing several files. Now read the first word of Sourcefile & search it into the folder consisting sevral files, and create another file with result. We hhave to pick the filename of the file in which... (3 Replies)
Discussion started by: mukesh.baranwal
3 Replies

4. Shell Programming and Scripting

Search in folder and subfolders

How can this be done? I mean, I want to search for all *png *jpg *bmp files in my ~/Pictures/ folder....How can I list them? Thank you geeks :) :b: (2 Replies)
Discussion started by: hakermania
2 Replies

5. Shell Programming and Scripting

write shell script to search file in folder

hi .. i have a problem how to search file with date and version number(ms_2.0_dd/mm/yy_24)in folder.Here 24 is version number and compare the this file to other file which is in another folder and if does not match then copy this file to respective folder.Also copy different files in different... (1 Reply)
Discussion started by: shubhig15
1 Replies

6. Shell Programming and Scripting

how to search for string that includes folder separator ?

I want to select only second line. I want to search for any line that has both -> input.txt /userA/aaaaaaabbb/jakarta /userA/aaaaaaa/jakarta /userB/aaaaaaabbb/jakarta /userB/aaaaaaa/jakarta This command does have effect of --> $>cat input.txt | /usr/xpg4/bin/grep -E... (13 Replies)
Discussion started by: kchinnam
13 Replies

7. Shell Programming and Scripting

Search through subfolders and move them into separate folder on the base of file size

Hello guys I am sure that you will help me on this issue as you did earlier::) Scenario : I have a folder named "XYZ". It consist many sub-folders and subfolder contain severals files. there may be abc.dat in each subfolder. Now i want to seperate subfolders on follwing conditions- if abc.dat... (12 Replies)
Discussion started by: infiant
12 Replies

8. Shell Programming and Scripting

File Management: How do I move all JPGS in a folder structure to a single folder?

This is the file structure: DESKTOP/Root of Photo Folders/Folder1qweqwasdfsd/*jpg DESKTOP/Root of Photo Folders/Folder2asdasdasd/*jpg DESKTOP/Root of Photo Folders/Folder3asdadfhgasdf/*jpg DESKTOP/Root of Photo Folders/Folder4qwetwdfsdfg/*jpg DESKTOP/Root of Photo... (4 Replies)
Discussion started by: guptaxpn
4 Replies

9. UNIX for Dummies Questions & Answers

How do I search parent folder only?

I have a directory /dir1/dir2/dir3/dir4/dir5. How can I search for files only in dir4/ and not in dir5? I tried the maxdepth command, but it doesn't work in this flavor of sun OS. When I search for files in dir4, it's giving me results from dir5 as well. I don't want this. Thanks. (3 Replies)
Discussion started by: bbbngowc
3 Replies

10. Shell Programming and Scripting

Parse the .txt file for folder name and FTP to the corrsponding folder.

Oracle procedure create files on UNIX folder on a regular basis. I need to FTP files onto windows server and place the files, based on their name, in the corresponding folders. File name is as follows: ccyymmddfoldernamefile.txt; Folder Name length could be of any size; however, the prefix and... (3 Replies)
Discussion started by: MeganP
3 Replies
Login or Register to Ask a Question