Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 hopkinsc
		
			hopkinsc
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi all,
I loop through a load of files in the script and need the beginning of the filename to be a new field so i know which file it has come from.
i.e.
the files i read in are :
BOB125_date
CWSL_date
PLDE22_Date
so what i want is to use everything before the _ as a new field.
Can anyone help?
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You could use something like this: subfield(filebasename(), '_', 1) as Source.
- Marcus
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You could use something like this: subfield(filebasename(), '_', 1) as Source.
- Marcus
