Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Checking if a file is there

Posted on 2001-08-12
2
Medium Priority
?
151 Views
Last Modified: 2013-12-25
Using perl how can i check if a file exists on the server
0
Comment
Question by:kplonk
2 Comments
 
LVL 3

Accepted Solution

by:
bigbed earned 200 total points
ID: 6379305
if ( -e 'fullpathnametofile' )
{
    # do stuff here
}

other tests include:
-d : directory
-f : plain file
-w : file is writable
-x : file is executable
-r : file is readable
-z : file has zero size
-s : file has non-zero size

have fun
0
 

Author Comment

by:kplonk
ID: 6401743
Thanks did the job nicly
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

885 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