From: LondonLad on
Hi
When I play my music on the Turntable System I have it creates a copy with
the extension OMX which makes my music files messy so I wrote a program to
delete
these. At the moment I run windows search to find all the ext OMX on all
drives
I then copy these to a temp folder and run my program to delete from that.
This works fine but I wondered if it is possible to replicate the search on
all Drives
within VB? and store the results direct to the temp folder?
I have tried google but so far did not find code to help me.

Ron
From: Jim Mack on
LondonLad wrote:
> Hi
> When I play my music on the Turntable System I have it creates a
> copy with the extension OMX which makes my music files messy so I
> wrote a program to delete
> these. At the moment I run windows search to find all the ext OMX
> on all drives
> I then copy these to a temp folder and run my program to delete
> from that. This works fine but I wondered if it is possible to
> replicate the search on all Drives
> within VB? and store the results direct to the temp folder?
> I have tried google but so far did not find code to help me.

Why do you copy them only to then delete the copies? Do you mean that
you move them to Temp?

Using Windows search, why not just Select all the found files and
Shift-Delete?

For VB, check out Randy's VBnet site to find examples of searching all
folders on a drive for files with a given extension:
http://www.vbnet.mvps.org

--
Jim Mack
Twisted tees at http://www.cafepress.com/2050inc
"We sew confusion"

From: LondonLad on
Hi Jim Mack
Thanks for your post I did use the windows search and then delete all, but I
decided to try and write something for myself. The delete was quite simple
but then I got stuck.
I had looked on the excellent VBnet site and although it includes many find
samples I could not find one that automatically searches all drives. Can you
help further?

Ron



"Jim Mack" wrote:

> LondonLad wrote:
> > Hi
> > When I play my music on the Turntable System I have it creates a
> > copy with the extension OMX which makes my music files messy so I
> > wrote a program to delete
> > these. At the moment I run windows search to find all the ext OMX
> > on all drives
> > I then copy these to a temp folder and run my program to delete
> > from that. This works fine but I wondered if it is possible to
> > replicate the search on all Drives
> > within VB? and store the results direct to the temp folder?
> > I have tried google but so far did not find code to help me.
>
> Why do you copy them only to then delete the copies? Do you mean that
> you move them to Temp?
>
> Using Windows search, why not just Select all the found files and
> Shift-Delete?
>
> For VB, check out Randy's VBnet site to find examples of searching all
> folders on a drive for files with a given extension:
> http://www.vbnet.mvps.org
>
> --
> Jim Mack
> Twisted tees at http://www.cafepress.com/2050inc
> "We sew confusion"
>
> .
>
From: Jim Mack on
LondonLad wrote:
> Hi Jim Mack
> Thanks for your post I did use the windows search and then delete
> all, but I decided to try and write something for myself. The
> delete was quite simple but then I got stuck.
> I had looked on the excellent VBnet site and although it includes
> many find samples I could not find one that automatically searches
> all drives. Can you help further?

All the code you need is somewhere on VBnet. Think about the tasks
that any app must do in the situation you describe:

Enumerate all possible drives, determine which are local, writable,
and whatever other criteria you like, then for each of the drives that
pass your tests, do a depth search for files of the given extension.
As you find them, delete them -- no need to gather them into one
place. If any are read-only etc, change attributes first. Decide what
you're going to do if one can't be deleted.

It's just basic programming, and even less because the hard work is
done for you and all you have to do is string together the bits from
Randy's site.

--
Jim Mack
Twisted tees at http://www.cafepress.com/2050inc
"We sew confusion"


> "Jim Mack" wrote:
>
>> LondonLad wrote:
>>> Hi
>>> When I play my music on the Turntable System I have it creates a
>>> copy with the extension OMX which makes my music files messy so I
>>> wrote a program to delete
>>> these. At the moment I run windows search to find all the ext OMX
>>> on all drives
>>> I then copy these to a temp folder and run my program to delete
>>> from that. This works fine but I wondered if it is possible to
>>> replicate the search on all Drives
>>> within VB? and store the results direct to the temp folder?
>>> I have tried google but so far did not find code to help me.
>>
>> Why do you copy them only to then delete the copies? Do you mean
>> that you move them to Temp?
>>
>> Using Windows search, why not just Select all the found files and
>> Shift-Delete?
>>
>> For VB, check out Randy's VBnet site to find examples of searching
>> all folders on a drive for files with a given extension:
>> http://www.vbnet.mvps.org

From: Randem on
This may help

Scan All Folders on Disk for File
http://www.randem.com/freesoftutil.html

--
The Top Inno Setup Script Generator - http://www.randem.com/innoscript.html
Free Utilities and Code - http://www.randem.com/freesoftutil.html