Код: Выделить всё
delovnaMapa = r"C:\Users\Tim\Desktop\ARSOFinalTest"
print(delovnaMapa)
today = datetime.now()
dateAndTime = today.strftime("%Y-%m-%d")
os.mkdir(delovnaMapa + "/" + dateAndTime)
workingDirectory = os.path.dirname(delovnaMapa) + "/" + dateAndTime
print(workingDirectory)
os.chdir(workingDirectory)
Код: Выделить всё
C:\Users\Tim\Desktop\ARSOFinalTest
C:\Users\Tim\Desktop/2022-10-30
Traceback (most recent call last):
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\IPython\core\interactiveshell.py", line 3437, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 8, in
os.chdir(workingDirectory)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\Tim\\Desktop/2022-10-30'
Подробнее здесь: https://stackoverflow.com/questions/742 ... ing-python
Мобильная версия