Docker volume name changed when running stack after changing directory name

  docker, docker-compose, docker-volume

I am experimenting with docker on windows and creating a stack for the same.

I just found that when i use docker-compose up -d, docker volume are created with the name like foldername_volumename.

I have a working app for the stack under one folder and just want to change the folder name. But found that while I changed it, it prevent me to use the same volume that was previously used.

I have some configurations and data that I will lose if i will move to another volume name.

Is there any way to reuse the same volume but still able to change the folder name?

What is the best practice?

Source: StackOverflow