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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FILE IDENTIFIER

Status
Not open for further replies.

Volkmaniac

Technical User
Mar 19, 2003
104
US
I'm having trouble understanding how to grab and open files using aspect. The following code will recognize and choose the correct file, but it will not open that file when prompted.

string fname
string FileSpec = "S:\Client Services\LETTERS\ARSN*.fz"
String sLine
String Output


long Newest
Fname = "[ None ]" if findfirst FileSpec Newest = $FLTIME Fname = $FILENAME while findnext if $FLTIME >= Newest Newest = $FLTIME Fname = $FILENAME endif

endwhile
endif
usermsg "%s" fname


This part doesn't work:

fopen 1 fname read text

While not feof 1

I tried fopen "%s" fname without any luck

 
Try using $FILESPEC instead. $FILENAME will contain the filename and extension, but not the location of the file. If the file was not in your ASPECT directory, then the script will not be able to open it.


aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top