Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if a file exists on a Win32 system

Status
Not open for further replies.

stephen2005

Programmer
Feb 13, 2005
53
IE
Does anyone know how to check if a file exists on a Win32 system? Thanks in advance.
 
Code:
if (-e "$dirname/$filename") {
  print "file exists\n";

You may have to change drives if the file isn't on the same disk

--Paul

cigless ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top