Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

Subject: how to check if a file exists using

Original Message
Name: Mauricio_Barrero
Date: December 13, 2004 at 09:27:58 Pacific
Subject: how to check if a file exists using
OS: Alpha 7.2
CPU/Ram: 600Mhz 2G
Comment:
Hi all all, I'm new to the board and I have a quick question: how can I check If a file exists using a conditional (IF..)
I've seen that I could use OPEN/error= and put an error label but this not very efficient for what I need. Any other easier way? thanks a lot


Report Offensive Message For Removal

Response Number 1
Name: KIRBY2000
Date: December 13, 2004 at 11:57:00 Pacific
Subject: how to check if a file exists using
Reply: (edit)
Try the F$SEARCH lexical function.

type:
$ HELP LEXICAL F$SEARCH

example:
$ START:
$ FILE = F$SEARCH("SYS$SYSTEM:*.EXE")
$ IF FILE .EQS. "" THEN EXIT
$ SHOW SYMBOL FILE
$ GOTO START

This command procedure displays the file specifications of the latest version of all .EXE files in the SYS$SYSTEM directory.
(Only the latest version is returned because an asterisk (*) wildcard character is not used as the version number.)
The filespec argument SYS$SYSTEM:*.EXE is surrounded by quotation marks (" ")
because it is a character string expression.

Thanks, Glen


Report Offensive Follow Up For Removal

Response Number 2
Name: Mauricio_Barrero
Date: December 13, 2004 at 13:22:35 Pacific
Subject: how to check if a file exists using
Reply: (edit)
Hi Glen thanks for the help!

Report Offensive Follow Up For Removal



Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: how to check if a file exists using

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software



Version Tracker Pro
Keep your software current and secure, effortlessly

Click Here for a Free Scan

Driver Agent
Automatically find the latest drivers for your computer.
Click Here for a Free Scan



The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC