Hi …
i create small form to collect some data for applicant , i add browse button to allow them for upload CV … (not that meaning of upload )
i just want the applicant to browse the attached USB or any drive to select the CV document ( *.PDF or *.DOC) then the command will automatic make copy to specific folder ( C:\Applicant CV\ ) and give name of file by applicant NO+date+time.
can we do like that ???
thanks for every one helping me
NewFileName := ‘C:\cf\cv_’ + FORMAT(ApplicantNo) + ‘_’ + FORMAT(CURRENTDATETIME,0,’<Month,2><Day,2>-<Minute,2><Second,2>’) + DELSTR(OldFileName,1,STRLEN(OldFileName)-4);
FILE.COPY(FileName,NewFileName);
Of course this works only with 3 characters extensions, should be better to extract from the original file name the part after the last dot and use it in order to manage extensions like “.xlsx”.
Hi geordie
new code gives me below error…
Microsoft Business Solutions-Navision
The value of DELSTR parameter 3 is outside of the permitted range.
The current value is: -4.
The permitted range is: from 0 to 2147483647.
OK
Please check the file name chosen by user, in this case seems empty (length = 0).