First off, sorry if this is not posted in the right forum. I wasn't sure if it was more appropriate here or in the "Chillout Room" or elsewhere.
I'm a noob when it comes to batch scripts, so I'd appreciate any help I could get. I tried doing all sorts of searches to find my answer (at least one I could understand) and was not able to figure it out. I have a batch file that loops through a directory and executes anything with the .py extension. I want to relocate the batch file to a subfolder, so I need to tell the script to move up a directory. Currently, the file is:
What do I need to do in order to be able to relocate the script to a subfolder and have it go up a directory to execute the loop? Currently, the script is in the same directory as the .py files and it works great, but I want to relocate the .bat to a subdirectory. Ideally, the solution would be relative and not absolute.Code:for /f %%a IN ('dir /b "*.py"') do python %%a pause