{"id":5986,"date":"2021-05-16T10:43:31","date_gmt":"2021-05-16T05:13:31","guid":{"rendered":"https:\/\/python-programs.com\/?p=5986"},"modified":"2021-11-22T18:49:05","modified_gmt":"2021-11-22T13:19:05","slug":"python-how-to-move-files-and-directories","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-how-to-move-files-and-directories\/","title":{"rendered":"Python : How to move files and Directories ?"},"content":{"rendered":"

How to move files and directories in python.<\/h2>\n

In python, shutil<\/code> module offers various files related operations<\/p>\n

Syntax- shutil.move(src, dst)<\/pre>\n

It accepts source and destination path and moves file or directory from source pointed as src to destination pointed as dst.<\/p>\n

Move a file to an another directory :<\/h3>\n

\u00a0<\/strong>We will pass source file in first parameter and destination file in second parameter as string. Some points to keep in view.<\/p>\n