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
0
Comments
FileName := CommonDialogMgt.OpenFile(Text006,'',2,'',0);
FILE.COPY(FileName,'C:\cf\cv.pdf');
it give error " file already exist"
can you help me , i want every time different name based on selection and applicant No
thanks for your usual help ...
only one thing how can i make the output ( *.pdf and *.doc) .. now i can save and reopen (*.PDF) only , other files is not recognized.
and also if the user select any files should not be accepted..
thanks again for your help
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".
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).
No, it isn't related to the NAV version; you can add this check to control the error but I'm pretty sure it's related to a non-valid OldFileName value (how can you have a name, including the extension, shorter than 4 characters?):
the old file is " d:\sam cv new.pdf"
How can be the name include extension is less than 4.