storescp .tmp file during receive and rename to dcm

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
dcarrion87
Posts: 2
Joined: Fri, 2023-09-15, 17:04

storescp .tmp file during receive and rename to dcm

#1 Post by dcarrion87 »

We've run into an issue where another process is picking up files whilst storescp is still retrieving resulting in corrupted files.

What is the best way to configure storescp to receive files as .dcm.tmp during receival and rename to .dcm once finished?

Thanks

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1445
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

Re: storescp .tmp file during receive and rename to dcm

#2 Post by Marco Eichelberg »

You could use the --exec-on-reception command line option to rename the incoming files after the receive process is complete. As an example, the following command line (for Linux) will cause storescp to append a ".dcm" filename extension only once a file has been completely received and written:

Code: Select all

storescp --exec-on-reception "/bin/mv #f #f.dcm" -v 104

dcarrion87
Posts: 2
Joined: Fri, 2023-09-15, 17:04

Re: storescp .tmp file during receive and rename to dcm

#3 Post by dcarrion87 »

Thanks for that. It's on windows and was hoping to avoid relying on external process for that part but should be able to work something out with that.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest