Jump to content

Wild cards in FileDelete


Recommended Posts

I want to delete the Seamonkey shortcut from the start menu on multiple PC's using:

FileDelete (@StartMenuCommonDir & "\Seamonkey 1.1.12.lnk")

However, I have noticed that many PC's have different names for the shortcut. e.g Seamonkey.lnk, Seamonkey.1.2.lnk, Seamonkey 1.1.12.lnk etc...

Is it possible to use a wildcard within the file name for Filedelete to recognise all links that have "Seam" in it?

FileDelete (@StartMenuCommonDir & "\Seam*.lnk")
Link to comment
Share on other sites

Wildcards are supported, yes!

See documentation!

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Link to comment
Share on other sites

I want to delete the Seamonkey shortcut from the start menu on multiple PC's using:

FileDelete (@StartMenuCommonDir & "\Seamonkey 1.1.12.lnk")

However, I have noticed that many PC's have different names for the shortcut. e.g Seamonkey.lnk, Seamonkey.1.2.lnk, Seamonkey 1.1.12.lnk etc...

Is it possible to use a wildcard within the file name for Filedelete to recognise all links that have "Seam" in it?

FileDelete (@StartMenuCommonDir & "\Seam*.lnk")

... I think it is much faster to make a test than typing this post ...

A-Jay

Rule #1: Always do a backup         Rule #2: Always do a backup (backup of rule #1)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...