Zend certified PHP/Magento developer

how to create a dupe dir under parent then rename a file parent name in windows

I’m trying to convert a kluged together linux script to windows command line.
so, below is my script, not elegent but somehow it works.

rar a -r0 boomer.rar

combines all the files into a rar file

mkdir ‘rar – ‘”${PWD##*/}”

makes a new sub-dir named the same as parent with “rar – ” prepended

cp boomer.rar ‘rar – ‘”${PWD##*/}”

copies boomer.rar to the new folder (see below*)

rm boomer.rar

removes rar file *becuse I couldn’t just get it to move

cd ‘rar – ‘”${PWD##*/}”

move focus to new dir

for fname in *.rar
do
mv $fname ‘boomer – ‘”$(pwgen 26 1).rar”
done

renames files (this is part of multiple scripts calling each other so why is prob not relevant) to “boomer – ” with a randomly generated 26 character string

Here’s the thing: I can’t figure out how to do “${PWD##*/}”.
I need help with this.

I am NOT a coder in any manner. This is all kluged together from researching steps on forums like this. I am clueless and don’t understand the code I use. Sorry, but sometimes the monkey hits the right keys.

I’ve been asked by members of my circle to make this work on windows. I’m working to the lowest common denominator here, so batch files. No WSL being installed. Just vanilla windows. Remember, monkeys here.

If it’s too difficult I’m ok with that. If it’s doable in monkey terms please help, I’d appreciate it.

If more info is need I will provide as much as is required, but I don’t know until told.

THanks In Advance