If you are in 12c version ,then renaming a datafile can be done online, without making the datafile offline.

In Oracle 12c

Moving datafile from filesystem to ASM:

Moving datafile from ASM to ASM:

Moving datafile in OMF file structure 

In 11g and previous versions:

If you are in 11g or previous version, you need to follow below steps to move or rename a datafile without shutting down the database.