Python Automation Project: File Organizer using Python | Codex Python

preview_player
Показать описание
Have you ever annoyed with a lot of unorganized files in your folder?
if yes, then this python script will help you automatically organize the files based on their type.

Modules used:
=============
OS:
The OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules.

SHUTIL:
Python shutil module enables us to operate with file objects easily and without diving into file objects a lot. This module helps in automating the process of copying and removal of files and directories.

Other Playlists:

Thank you for Watching!!!

Support me to get 1k subscribers

=========================================
LIKE, COMMENT, SHARE & SUBSCRIBE to my channel!
=========================================

#FileOrganizer #CodexPython #PythonTutorial #PythonProjects
Рекомендации по теме
Комментарии
Автор

If you want to save the pathway to a variable you have to put a r before:

path = r"C:\Users\User_\Downloads"

emmaaberg
Автор

Is there some way to do it automatically when I install something?

sazanlord
Автор

oh my god thank you so much my desktop looks so much better!

AnIslamicDude
Автор

This worked flawlessly. Thanks for teaching us.

brianphilip
Автор

Thats easy and also what I been looking for, thank you 🎉🎉

hexortime
Автор

How do I organize it by date of file & should create dir for sane? thanks in advance.

krishnagauda
Автор

something is wrong with shuntil for some reason shuntil isnt loading

hapiedgamers
Автор

Thhis wont work for me. This is the error it shows, "
C:\organizationfolder : The term 'C:\organizationfolder' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ C:\organizationfolder
+
+ CategoryInfo : ObjectNotFound: [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
." Does anyone know the fix?

chilisauceee
Автор

I think your code should be wrote like below to cleaner:
for file in files:
file_name, extension = os.path.splitext(file)

path_is_checked_exist = os.path.join(path, extension)

if not


path_of_file_moved = os.path.join(path, file)
shutil.move(path_of_file_moved, os.path.join(path_is_checked_exist, file))

diamondcode
Автор

How could I modify this code, so it works equally for Linux OS ?

SusanAmberBruce
Автор

Can you explain what is filename, extension

melonlord
Автор

Exception has occurred: PermissionError

SHUBH
Автор

Sad i might learn a programing language when i have free time
This could be usful but with more details n different typs of orgnistion n excluding some file names n types n different stuff

AhmadHossam
Автор

Unexpected indent on if.os.path.exists

jaikara
join shbcf.ru