Extracting the certificate and keys from a .pfx file

i am getting an error while using git bash, i am trying to convert a certificate to pfx while running the command i am getting the below error,
openssl pkcs12 -in ****** -nocerts -out privatekey.pem
when i run the above command i am getting the below error
can’t open **** for reading No such file or directory
84450000:error:80000002:system library:BIO_new_file:No such file or directory:…/openssl-3.1.2/crypto/bio/bss_file.c:67:calling fopen(*****, rb)
84450000:error:10000080:BIO routines:BIO_new_file:no such file:…/openssl-3.1.2/crypto/bio/bss_file.c:75:

I think the problem here is your syntax. See if this works for you:

openssl pkcs12 -inkey privatekey.pem -in mycert.pem -export -out mycert.pfx

i am trying to import the cert to AWS ACM with the following commands

i have installed open ssl also, still i am getting this error

Are you trying to convert a PEM to PFX, or the reverse?

actually i am trying to Extracting the certificate and keys from a .pfx file