Jump to content


Photo
- - - - -

Reading file name from PRO IV


1 reply to this topic

#1 ajayparmar

ajayparmar

    Newbie

  • Members
  • Pip
  • 1 posts
  • Gender:Male

Posted 30 July 2003 - 05:52 PM

How do I read file name itself (and not file content) from proIV code. I am using ProIV version 4.6.

Before processing a file I would like to read a file name and log a file name. Also according to certain extension I process file differently. So, it is very important to read the file name in code itself.

I am sure there must be some system command but I don't know what and how to use that.

TIA
Ajay

#2 Chris Mackenzie

Chris Mackenzie

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 368 posts
  • Gender:Male
  • Location:Bristol, United Kingdom

Posted 31 July 2003 - 07:29 AM

That's not possible directly, I believe. What you need to
do is issue an OS call to get a directory listing output to
a file and then read that file.

E.g. (this is VMS)

SYSTEM('DIR ' + &$FILE_LOCN + 'whateverpatternyou want*.*' + /NOHEADING/NOTRAILING/OUTPUT=temp.TXT')


or Unix somthing like this

#STAT = 'ls -1' + &$FILE_LOCN + 'namepattern*.* > temp.txt

then read temp.txt to get the file name
The content and views expressed in this message are those
of the poster and do not represent those of any organisation.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users