On 10/9/25 7:44 AM, Tom Browder wrote:
if not unlink $OldFileName { PrintRedErr( "Unable to Delete OldFileName <$OldFileName>\n" ); }Todd, what is your intent? Do want to delete an existing? Or not?
Hi Tom, I want to delete an existing file. This is a file download program that checks for new revisions of software I support and copies to a special flash drive with a read only switch, so it does not pick up or spread viruses. If it finds a new version, it downloads it and removes the old version. In this particular sub, the new version is tested to see if it is the predicted size. If so, it deletes the old version of that file. If the size test file fails, it alerts and removes that bad new file (303 not found, etc.) and leaves the old file alone. I was presuming that unlink returned a true or false. True if delete was successful and false if not. The results were random. (It mostly worked.) -T
