I have many questions about parameters...

I have a folder in desktop named FFMPEG with ffmpeg.exe and Remux.bat.
In this folder there are 3 folders: Original, Demuxed and Remuxed.

In the Original folder there is a bunch of video, (MP4, MKV, AVI, MPG etc), everyone with different video and audio codecs (MPEG2, H.263, H.264, H.265, MPEG2, MPEG4 etc).

My Goal is to demux all that videos in elementary streams manteining original name and the right extensions (M4A, m4V, MP2 etc) in the folder named Demuxed.
After this I want remux the streams with the original extension.

Is possible do this with only one .bat or are needed two or more?
FFMPEG require always absolute path or even relative (ex. in the same folder of the executable)?
How it's possible, reading the demuxed files, understand what is the correct extenion?

Sorry if these questions or are too difficult...