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

reg filename validations

Status
Not open for further replies.

crux123

Technical User
Aug 1, 2008
1
US
Hi,
I am working on a scenario where in I have got a control file (control.txt) whose contents are some filenames
(say for eg file1.txt , file2.txt,file3.txt etc) .
These text files are actually also present say in my map directory for example.

Thus based on the control file contents , i want my map to validate whether these data files are actually available in the map directory.

Any suggestions are welcome.

Regards
 
Hello,

Which operating system will this(map) be executed. Please mention that.

Thanks,
smerck
 
Try using GET with the VALID command wrapped around. If the GET works, then the file exists.
 
This might be a better solution as it does not load the file.
In Windows use the rule

=GET("BAT","-cli -cmd 'dir c:\dirlist.txt' /B") /*how to run a batch command in a rule

If it finds the file it returns the file name. If the file is missing it returns nothing.
For generic use substitute the hard coded file name with the input card file name.

Or you could do this

valid(GET("BAT","-cli -cmd 'dir c:\dirlist.txt /B'"),"missing")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top