Windows XP:  how to search for shortcuts in all Desktop Profiles (across all users)

Posted on 2011-10-28
Last Modified: 2012-05-12
I need to update a url shortcut across all Users' Desktops on several Windows XP systems.  How can I search across all Users' profiles, and only in their Desktops, for url shortcuts?  I want to find any outdated shortcuts before I add in an updated shortcut to a new server location.  It appears that the url shortcuts I am wanting to seach for end in .url

I'm open to being able to do this in the native windows search, or by command line (or batch file).
Question by:sah18
    LVL 12

    Expert Comment

    Try performing a search for .lnk files.  Be sure to search the either the whole hard or c:\documents and settings folder.
    LVL 9

    Author Comment

    This is exactly what I'm trying to avoid -- searching the whole hard drive.  I want a way to *only* search within the Desktop folders for each user profile.  There can be over a hundred profiles on any of these machines, and I don't want to search across users' documents, etc, when I am not looking in those folders.  This would add a lot of unneeded time to the search.  

    Also, the file extension that I am searching for (as mentioned in my original question) is *.url, not *.lnk.
    LVL 13

    Expert Comment

    Use this command:

    dir "C:\Documents and Settings" /S *.lnk
    LVL 2

    Accepted Solution

    Open C: Drive
    Type in the search field >

    After the search is completed switch to Details View(View->Details) or (press ALT +V & select Details)
    Now go to View->Details -> SortBy -> More -> Select FOLDER NAME and click ok

    Now Click the FolderName(ALT+V -> SortBy -> Folder Name)

    Now Check the Folder Name column
    Now find the Folder name "Desktop"...
    These are the files you may want to update


    LVL 66

    Expert Comment

    This searches for it....
    If it finds it....Deletes it.
    If it Deletes it, it copies another one from the network.....

    Put it in a Logon Script, and it catches all users....

    if exist "%userprofile%\desktop\File Name.URL" del /Q "%userprofile%\desktop\File Name.URL" && copy /Y "\\server\share\Newlink.URL" "%userprofile%\desktop\"

    Course if you don't know the file name, makes it a bit harder....

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
    Communication between departments might not happen in two different languages, but they do exist in two different worlds. With different targets and performance goals the same phrase often means something completely different to each party. Learn ho…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now