Thanks to many of you already who have posted example scripts and good questions that have already helped me on this project (unbeknownst to you).
I have written a program that updates and maintains a list of programs and games across a network. Some of them are copied from a central server to the clients, others are symlinked. They are all checked every time the computer starts up to make sure their version is current and critical files are present. I have however run into a quirk that I cannot find a solution for.
When an update is determined to be required, programs that are symlinked are simply deleted locally and re-linked using a file list from the server.
When an update is required for a program that is flagged as "copy", I call robocopy with flags telling it only to update files that are newer or not present.
The odd quirk that I have just found is that I have a game that I tried to run as a symlink, but it didn't like running multiple instances (locks data files during runtime). So I switched its flag to copy. However the script scans the directory, which is linked back to the master copy, and sees that everything is already up to date, because it's looking at itself.
What I need is a function to determine if a local file/directory is "real" or a symbolic link. I've looked through the help file but I can't find anything, and apparently nobody's posted anything about it on the forum, or I'm using the wrong keywords to search.