‎2009 Sep 25 11:41 AM
Hi,
I am reading one directory and reading files from there.To upload the files into my program I have to make the file path.But my files are named with some prefix characters which is not constant.
Can any one suggest how to find the prefix while reading the file names from the directory?
I have some structure names already present in program.And the file names are named as some "prefix_the structurename.txt".I have to find the prefix.
Edited by: Ginger on Sep 25, 2009 6:42 AM
‎2009 Sep 25 11:55 AM
Hi Ginger,
Try :
ld_lg_suffix = STRLEN( ld_structurename ) + 4. " + 4 for the '.txt'
ld_lg_prefix = STRLEN( ld_filename ) - ld_lg_suffix - 1. " - 1 for the '_'
ld_prefix = ld_filename(ld_lg_prefix).Best regards.
Samuel
‎2009 Sep 25 11:55 AM
Hi Ginger,
Try :
ld_lg_suffix = STRLEN( ld_structurename ) + 4. " + 4 for the '.txt'
ld_lg_prefix = STRLEN( ld_filename ) - ld_lg_suffix - 1. " - 1 for the '_'
ld_prefix = ld_filename(ld_lg_prefix).Best regards.
Samuel