This is for my small project, I am trying to set the current working directory of the process to one directory up, as if my current directory .. \ downloads \ movies I would like the code to set the directory .. \ downloads
I know that this is possible by getting the current path to the working directory and extracting from it the path of the directory that I need, and then run chdir (), however this code should be as efficient and easy as possible, and I find the method to be cumbersome above .
Thanks in advance falks.
source
share