Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search file pairs

Status
Not open for further replies.

mvvilleza

MIS
Nov 23, 2000
114
PH
Hi all,

Here's the scenario:

I have several files:
file1.ds
file1
file2.ds
file2
file3
file4
file5
etc....

What I want is to list all files with ds on them and same filename without the ds.

 
Thanks. But it does not answer my problem. I'd like to list all pairs maybe using wildcards since i'm searching for files with ds and without ds.
 
What are the other possible file extensions?

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
actually, i just want to seach files with or without the ds. These files have a common extension w/c is .img. We have several files with .img extension and i want to list files of name filex.img and filex.ds.img only (where x is common for both files).
 
Correction:

actually, i just want to seach same files with and without the ds. These files have a common extension w/c is .img. We have several files with .img extension and i want to list files of name filex.img and filex.ds.img only (where x is common for both files).
 
What do you have so far or have you tried? I think what PHV was hinting at is that you will need to start with using the FileSystemObject to enumerate the files in the path you choose.

Put something together if you haven't already and post so we can then help.

Do a search in this forum for FileSystemObject or recurse since looking at files and folders seems to be a very common question.

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top