Skip to main content

Phase 3 - Renaming downloaded products to their original file names - Knowledgebase / Post-Observations (Phase 3) / Phase 3 FAQs - ESO Operations Helpdesk

Phase 3 - Renaming downloaded products to their original file names

Authors list

Q:  How can I rename the P3 products from their ADP names to the original file names?

A: In the case of files downloaded via the Request Handler, the correspondence between file-id and original file-name is mapped in the README file associated to each data request. The renaming commands can be extracted directly from the README file using the following shall command:

awk '/\- ADP/{ print "mv "$2, $3}' README_123456.txt

In some cases it can happen that during the downloading the ':' of the file name is replaced by a '_', if so, please use this other command line:

awk '/\- ADP/{ print "mv "$2, $3}' README_123456.txt | awk '{gsub(/\:/, "_", $2)}1'