To save petty details, here is what I am currently using
Keep in mind the listed code works perfectly on its own when I edit the file with a specific directory.
-Fileremover.cmd-
takeown /f "whatever directory I want" /r /d y
icacls "whatever directory I want" /grant administrators:F /t
call cleanit.cmd
-cleanit.cmd-
rd /s /q "whatever directory I want"
I am trying to figure out a way to either
A: have the cmd promt me to input the directory to execute the takeown, or
B:use a bat/cmd file to replace a designated directory with a directory specified on the command prompt window inside a created copy or a cmd file.
so for example,
COPY C:\test.txt test2.txt
COPY C:\cleanit.cmd cleanit2.cmd
then have it replace "whatever directory I want" with something I enter into the cmd prompt
afterwards of course have them run then get deleted through some means, which I can do. It is just the input I am having trouble with, I searched high and low as well as tried a few switches and different lines.
I would be happy to even learn some scripting if needed. I just want this to be successful. Thank you for reading and your responses
If this does not make sense I am more than happy to try and clarify.