I was planning to use the following windows batch command to loop through some files that I want to execute some commands on it.
FOR /R [[drive:]path] %%parameter IN (set) DO command
In my CASE
FOR %%v IN (*.pyc) DO uncompyle6 -o . "%%v"
Where uncompyle6 -o . "file-path not directory-path" is the code I would like to execute to decompile all pyc files, including those files under the subdirectory.
Since the "DO" command executes with respect to the current working directory, so all my decompiled file also outputted to the current working directory.
Therefore, my question is how do I change my code? So that the decompiled file inside the subdirectory will be outputted to their own directory instead of the current working directory where the batch file is executed?