#!/bin/tcsh

foreach f ( $* )
	# only filename
	setenv bnfn `basename ${f}`

	# remove the first 5 char
	# setenv ff `echo ${bnfn} | awk '{print substr($f, 6)}'`
	setenv ff ${bnfn}

	# get the dataset id from file name
	# set fcdf to be the CDF regular file naming
	setenv fcdf ${ff}
	setenv dsid `echo ${fcdf} | awk '{print substr($f, 1, 1) substr($f, 14, 4) substr($f, 2, 1)}'`

 	# print file name, with path, no CR
	#echo -n ${f}
	# print file name, no path, no CR
	echo -n ${bnfn}

 	# print file size(KB)
 	find $f -printf ',%k,'

 	# print dataset id
	echo ${dsid}
end

