I would say that a post of me with an alternative to another question might be helpful here as well:
https://community.ifs.com/people-all-about-your-employees-38/document-attachments-1806?postid=7438#post7438
The trick here would be to derive the correct x (50 in this post) documents. Maybe an entry point can be documents in a specific document folder (standard functionality in IFS) or all the document numbers in a conversion list (part of basic data of Data Migration).
Steve
Hi @henfri ,
There are set of methods in batch_transfer_handler_api
to download set of documents from IFS Document repository to a shared file location.
Below script will do the work for you :)
change the where condition to filter your documents.
Here, F:\fileshare\temp\ is a folder located in IFS Middleware Server. If you are need to download file to a shared folder, make sure IFS middleware server has full access to that location.
-- Created on 2019-07-03 by DSJ
declare
-- Local variables here
error_msg_ VARCHAR2(32000);
file_name_ varchar2(32000);
CURSOR get_rec is
SELECT * FROM edm_file_storage where doc_class = '109';
begin
-- Test statements here
FOR rec_ IN get_rec LOOP
file_name_ := edm_file_api.get_file_name(rec_.doc_class,
rec_.doc_no,
rec_.doc_sheet,
rec_.doc_rev,
rec_.doc_type);
batch_transfer_handler_api.download_from_db(error_msg_,
rec_.doc_class,
rec_.doc_no,
rec_.doc_sheet,
rec_.doc_rev,
rec_.doc_type,
rec_.file_no,
'F:\fileshare\temp\' || file_name_);
IF error_msg_ IS NULL THEN
dbms_output.put_line('success');
ELSE
dbms_output.put_line(error_msg_);
END IF;
END LOOP;
commit;
end;
Cheers!
If it is a one time thing, you can also use Windows Powershell, Navigate to the folder and use the following command to delete the “Copy of” Part.
Dir | Rename-Item -NewName {$_.name -replace "Copy of ",""}
If you have a text behind the document, you can also use the following command to remove the last part of a document name (in this case the last 32 characters)
Dir | Rename-Item -NewName {$_.name.substring(0,$_.BaseName.length-32) + $_.Extension}
Thanks for your answers! However, I had hoped to get a more simple solution, like click on that menu option and you are done or ask you administrator to adjust a setting in the IFS configuration.