I did a similar project in my inter-college hackathon in python and won the first prize...... I also used OMDB api and tried to sort the films according to the genre and place it in respective genre folder inside a video folder..... Also used a simple progress bar in command line to show the status..... It was considered one of the unique project of all in that hackathon... Glad to see similar project in your channel 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
It's really helpful for all of us.I have been looking to do this kinda work using python but not able to execute it properly..Thank u so much for this one❤️🙏
08:20 imgExts = [".png", ".jpg",] images = [file for file in files if os.path.splitext(file)[1].lower() in imgExts ] Bro yahan pe [1] iska kya use hai???
@ROYAL GAMING bhai vo.jpg,. png wale part ko detect karne ke liye likha hai kuki indexing 0 se start hoti hai agar vo nhi likhte to vo pure file ko le leta is liye sirf . Wala part categorize karne ke liye 1 index ka use kiya hai
Same thing can be achieved using the following code. I have also used shutil module and tried to make the code simpler. Also added the count feature which will count the number of files organised. Please check the code. import os import shutil def createIfNotExist(folder): if not os.path.exists(folder): os.mkdir(folder) def fileExtChecker(list): if (file.lower().endswith(list)): return file
Aapke python tutorials maine abhi abhi dekhni start ki hai aur kasam se mujhe bohot maja aa raha hai. Aapke playlist me aapne exercise 5 me Health Management system diya tha shayad aapko yaad hoga. Meri request hai aap ekbaar mera bhi check kar dijiyena please..... And please tell if I can improve it anyway😊😊 ❤❤❤❤❤❤❤ code starts here👇 """ Hi I am Ritik Kujur and I am watching your python tutorials. Aapko shukriya kehna chahta hun, aap bohot achha samjhate hai. Please bataiye mera banaya hua progam kaisa hai. Ye sab maine aap se hi seekha hai ye line "return datetime.datetime.now().strftime("%D.%H.%M")" maine jarvis video me seekha tha isliye yaha use kar liya Aur wo bracets experiments kar ke pata kiye ki aisa bhi hota hai Thanks!! """ open("Harry exercise.txt", 'x') open("Harry diet.txt", 'x') open("Rohan exercise.txt", 'x') open("Rohan diet.txt", 'x') open("Hammad exercise.txt", 'x') open("Hammad diet.txt", 'x') import os def getdate(): import datetime return datetime.datetime.now().strftime("[%D].[%H.%M]") def management(): print("Welcome to Health Management") print("What do you want to do?") print("1.lock") print("2.Retreive") print("(Anser in 1 or 2)") choice = input("your operation: ")
if choice == '1': print(" 1.Harry ", "2.Rohan ", "3.Hammad") client = input("Choose the client: ") if client == '1': print(" 1.Exercise ", "2.Diet") task = input("Choose your task: ") if task == '1': with open("Harry exercise.txt", 'r+') as f: print(f.read()) exercise = input("Which exercise you did or want to do? ") f.write(" ") f.write(getdate()) f.write( exercise) print("OK, progress saved!!") elif task == '2': with open("Harry diet.txt", 'r+') as f: print(f.read()) diet = input("What diet you had? ") f.write(" ") f.write(getdate()) f.write( diet) print("OK, progress saved!!") else: print("Check your input")
if client == '2': print(" 1.Exercise ", "2.Diet") task = input("Choose your task: ") if task == '1': with open("Rohan exercise.txt", 'r+') as f: print(f.read()) exercise = input("Which exercise you did or want to do? ") f.write(" ") f.write(getdate()) f.write( exercise) print("OK, progress saved!!") elif task == '2': with open("Rohan diet.txt", 'r+') as f: print(f.read()) diet = input("What diet you had? ") f.write(" ") f.write(getdate()) f.write( diet) print("OK, progress saved!!") else: print("Check your input: ")
if client == '3': print(" 1.Exercise ", "2.Diet") task = input("Choose your task: ")
if task == '1': with open("Hammad exercise.txt", 'r+') as f: print(f.read()) exercise = input("Which exercise you did or want to do? ") f.write(" ") f.write(getdate()) f.write( exercise) print("OK, progress saved!!") if task == '2': with open("Hammad diet.txt", 'r+') as f: print(f.read()) diet = input("What diet you had? ") f.write(" ") f.write(getdate()) f.write( diet) print("OK, progress saved!!") else: print("Check your input: ") back = input("Do you want to return to menu?") back = list(back) if 'e' in back: management() if 'o' in back: print("See ya!!") elif choice == '2': print(" 1.Harry ", "2.Rohan ", "3.Hammad") client = input("Choose the client: ") if client == '1': print(" 1.Exercise ", "2.Diet") task = input("Choose your task: ") if task == '1': f = open("Harry exercise.txt", 'r') content = f.read() print(content) f.close() elif task == '2': f = open("Harry diet.txt", 'r') content = f.read() print(content) f.close() else: print("Check your input") elif client == '2': print(" 1.Exercise ", "2.Diet") task = input("Choose your task: ") if task == '1': f = open("Rohan exercise.txt", 'r') content = f.read() print(content) f.close() if task == '2': f = open("Rohan diet.txt", 'r') content = f.read() print(content) f.close() else: print("Check your input") elif client == '3': print(" 1.Exercise ", "2.Diet") task = input("Choose your task: ") if task == '1': f = open("Hammad exercise.txt", 'r') content = f.read() print(content) f.close() if task == '2': f = open("Hammad diet.txt", 'r') content = f.read() print(content) f.close() else: print("Check your input") else: print("Check your input") back = input("Do you want to return to menu?") back = list(back) if 'e' in back: management() if 'o' in back: print("See ya!") management()
Aapne usme python 3.7.1 use Kiya hai or pucharm 2018 but 2020 updated version me bhut error aa rhe hai. Koi bhi program run nhi hi rha hai. Kya kre ? Prashant Panchal
I am getting permission error [ win error 5 ] access is denied. I try to run the script through administrator but it is not working. Please try to help me here.
hi, Disha here. I am doing python by ur beginner python course. I am confused in an exercise given by you.Its a pyramid problem. Kindly check it and reply too. n=int(input("enter n:")) p=input("enter ch") if p=='t' : for i in range(1,n+1,1): for j in range(i): print("*",end="") print() elif p=='f': for i in range(n,0,-1): for j in range(i): print("*",end="") print()
hey harry! I did this project bt in my way :D my code is: import os def create_if_doesnt_exist(folder): # A function to create a folder if it doesn't exist already if not os.path.exists(folder): os.makedirs(folder) def move(foldername, files): # A function to move the files to the folder it belongs. for file in files: os.replace(file, f"{foldername}/{file}") def take_file_extension(exts): # a function to get the file extension return [file for file in files if os.path.splitext(file)[1].lower() in exts] files = os.listdir() # taking the file names in a list files.remove("Automatic Folder cleaner.py") imgExts = [".png", ".jpg", ".jpeg"] images = take_file_extension(exts=imgExts) docExts = [".txt", ".docx", ".doc", ".pdf"] documents = take_file_extension(exts=docExts) torrExts = [".torrent"] torrents = take_file_extension(exts=torrExts) # taking the files according to their extensions. extensions are registered in a list create_if_doesnt_exist('images') create_if_doesnt_exist('docs') create_if_doesnt_exist('torrents') create_if_doesnt_exist('others') others = [] for file in files: ext = os.path.splitext(file)[1].lower() if (ext not in imgExts) and (ext not in docExts) and (ext not in torrExts): others.append(file) move("images", images) move("docs", documents) move("torrents", torrents) move("others", others)
While moving into another folder using function I am facing this error" TypeError: replace: src should be string, bytes or os.PathLike, not list". But if I do it manually without using move function then it's fine . What should I do ?
Hello bro I'm new in your channel.....? I'm confused....... Which language is best to learn to make a Computer Operating System.......? Can you help me please which language . I learned to make an operating system. Please bro please help me
Mere program me media folder me media files nahi ja rahi hai aur error message de raha hai - " replace: src should be string,bytes or is. PathLike , not list" ye error aa raha hai
Everybody knows Harry is the best 👩💻😎
No bro harryis worst the best is peogrammer hero
Code with harry has dillite his channel
@@mohammedkhaleel2150
🙄
I did a similar project in my inter-college hackathon in python and won the first prize......
I also used OMDB api and tried to sort the films according to the genre and place it in respective genre folder inside a video folder.....
Also used a simple progress bar in command line to show the status.....
It was considered one of the unique project of all in that hackathon...
Glad to see similar project in your channel 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
Amazing idea will try this !
@@sb_infi Event
You are the best guru ji in technical Field
Unique way of teaching.. Best teacher i have ever got.
Sir please bring a course on Data Structures and Algorithms.
Yes sir please make course on Data structures and algorithms.
Yes sir please please
That too in Python. Please!!
+1
Mom - Mera beta bina code copy kiye coding karta h!!
Modiji - codewithharry wala h kya?
😂
Lol
Thank you harry bhai 🤗🤗
What a intelligent you are man👏
Keep It Up! Love you❤️ You are inspiraton to All Programmers! Specially Python!
programmers ki spelling galat h !!!!!!!!!!!1
spelling mistake h
Insaan se hi galti hoti hai bhai
Ha bhai tabhi to sik pata hai achsee
Bb bhai Spelling galat hai
Sabse acha UA-cam channel hindi me
😍😍😍😍😍😍😍
Ab tak Mera sabse favorite video.
Thanks to make it Harry bro 🤘🤘😎😊🙏
It's really helpful for all of us.I have been looking to do this kinda work using python but not able to execute it properly..Thank u so much for this one❤️🙏
I like this ♥️♥️♥️♥️♥️♥️♥️dedo
Harry bhai dil se saari videos dekhta hu
08:20
imgExts = [".png", ".jpg",]
images = [file for file in files if os.path.splitext(file)[1].lower() in imgExts ]
Bro yahan pe [1] iska kya use hai???
@ROYAL GAMING bhai vo.jpg,. png wale part ko detect karne ke liye likha hai kuki indexing 0 se start hoti hai agar vo nhi likhte to vo pure file ko le leta is liye sirf . Wala part categorize karne ke liye 1 index ka use kiya hai
@@PriyanshuSingh-qj7jz ohhh okay
sir you are genius. sir apka or mera favorite hain python.
No words to appreciate your hard work and talent. You deserve million subscribers.
I donot have word to speak something. You are great. god bless you. You are the real hero for me. Thanks sir.
harry bhai beginners series follow kr rha hu lockdown khulne tk python expert ban jayuga thank you , luv you bro
thnx for project idea for me during lockdown
harry bhai pls pls kivy course
Same thing can be achieved using the following code. I have also used shutil module and tried to make the code simpler. Also added the count feature which will count the number of files organised. Please check the code.
import os
import shutil
def createIfNotExist(folder):
if not os.path.exists(folder):
os.mkdir(folder)
def fileExtChecker(list):
if (file.lower().endswith(list)):
return file
files = os.listdir()
files.remove("auto.py")
createIfNotExist("Images")
createIfNotExist("Docs")
createIfNotExist("Media")
createIfNotExist("Other")
imgExts = ('.png', '.jpg', '.jpeg','.bmp')
docExts = ('.pdf', '.doc', '.docx', '.xlsx', '.pub')
mediaExts = ('.mp4', '.mp3')
for file in files:
if(fileExtChecker(imgExts)):
images = file
shutil.move(images,'Images')
elif(fileExtChecker(docExts)):
docs = file
shutil.move(docs,'Docs')
elif(fileExtChecker(mediaExts)):
media = file
shutil.move(media,'Media')
else:
other = file
shutil.move(other,'Other')
print(f"Organised {len(files)} total files
")
Mazedaaar harry bhai. Zaroor try karunga. Harry bhai aesehi please aur bhi mini projects laate rahiye achi practice horahi he
Love for Python series
It's actually very useful for people like me who keep their stuff really unmanaged
Jahapana tussi great ho... salaam qubool karo!!!
yes sir plzzz bring a course
on data structures and algorithms
How to get this code?? Or we have to write??
Bhai plz REACT JS par information dijiye
Harry sir mai 11 saal ka hu, sir maine agar HTML5 aur css3 sikha hai to sirf apse sir, really salute to you harry sir, please comment me
Very helpful Thank you Harry bhai
Pirogremer(stonk meme) 😂😂😂 just a fun, you are too talented man
Harry bhaiya mene jarvis AI banaya and i am 13 years old
And its works
Thanks Bhai
Bestest programmer i ever seen
Love u ❤
Bhai you are a genius. You created an option level thing. Great Bhai Heart bhi chahiye
Bhai I am 11 years old and your videos are great , you should deserve millions of subscribers.
Sabko ik ik dil. Melga meri tarse matal Hari bhai ❤️
Aapke python tutorials maine abhi abhi dekhni start ki hai aur kasam se mujhe bohot maja aa raha hai.
Aapke playlist me aapne exercise 5 me Health Management system diya tha shayad aapko yaad hoga.
Meri request hai aap ekbaar mera bhi check kar dijiyena please..... And please tell if I can improve it anyway😊😊
❤❤❤❤❤❤❤
code starts here👇
"""
Hi I am Ritik Kujur and I am watching your python tutorials.
Aapko shukriya kehna chahta hun, aap bohot achha samjhate hai.
Please bataiye mera banaya hua progam kaisa hai.
Ye sab maine aap se hi seekha hai
ye line "return datetime.datetime.now().strftime("%D.%H.%M")" maine jarvis video me seekha tha isliye yaha use kar liya
Aur wo bracets experiments kar ke pata kiye ki aisa bhi hota hai
Thanks!!
"""
open("Harry exercise.txt", 'x')
open("Harry diet.txt", 'x')
open("Rohan exercise.txt", 'x')
open("Rohan diet.txt", 'x')
open("Hammad exercise.txt", 'x')
open("Hammad diet.txt", 'x')
import os
def getdate():
import datetime
return datetime.datetime.now().strftime("[%D].[%H.%M]")
def management():
print("Welcome to Health Management")
print("What do you want to do?")
print("1.lock")
print("2.Retreive")
print("(Anser in 1 or 2)")
choice = input("your operation: ")
if choice == '1':
print(" 1.Harry
", "2.Rohan
", "3.Hammad")
client = input("Choose the client: ")
if client == '1':
print(" 1.Exercise
", "2.Diet")
task = input("Choose your task: ")
if task == '1':
with open("Harry exercise.txt", 'r+') as f:
print(f.read())
exercise = input("Which exercise you did or want to do? ")
f.write("
")
f.write(getdate())
f.write( exercise)
print("OK, progress saved!!")
elif task == '2':
with open("Harry diet.txt", 'r+') as f:
print(f.read())
diet = input("What diet you had? ")
f.write("
")
f.write(getdate())
f.write( diet)
print("OK, progress saved!!")
else:
print("Check your input")
if client == '2':
print(" 1.Exercise
", "2.Diet")
task = input("Choose your task: ")
if task == '1':
with open("Rohan exercise.txt", 'r+') as f:
print(f.read())
exercise = input("Which exercise you did or want to do? ")
f.write("
")
f.write(getdate())
f.write( exercise)
print("OK, progress saved!!")
elif task == '2':
with open("Rohan diet.txt", 'r+') as f:
print(f.read())
diet = input("What diet you had? ")
f.write("
")
f.write(getdate())
f.write( diet)
print("OK, progress saved!!")
else:
print("Check your input: ")
if client == '3':
print(" 1.Exercise
", "2.Diet")
task = input("Choose your task: ")
if task == '1':
with open("Hammad exercise.txt", 'r+') as f:
print(f.read())
exercise = input("Which exercise you did or want to do? ")
f.write("
")
f.write(getdate())
f.write( exercise)
print("OK, progress saved!!")
if task == '2':
with open("Hammad diet.txt", 'r+') as f:
print(f.read())
diet = input("What diet you had? ")
f.write("
")
f.write(getdate())
f.write( diet)
print("OK, progress saved!!")
else:
print("Check your input: ")
back = input("Do you want to return to menu?")
back = list(back)
if 'e' in back:
management()
if 'o' in back:
print("See ya!!")
elif choice == '2':
print(" 1.Harry
", "2.Rohan
", "3.Hammad")
client = input("Choose the client: ")
if client == '1':
print(" 1.Exercise
", "2.Diet")
task = input("Choose your task: ")
if task == '1':
f = open("Harry exercise.txt", 'r')
content = f.read()
print(content)
f.close()
elif task == '2':
f = open("Harry diet.txt", 'r')
content = f.read()
print(content)
f.close()
else:
print("Check your input")
elif client == '2':
print(" 1.Exercise
", "2.Diet")
task = input("Choose your task: ")
if task == '1':
f = open("Rohan exercise.txt", 'r')
content = f.read()
print(content)
f.close()
if task == '2':
f = open("Rohan diet.txt", 'r')
content = f.read()
print(content)
f.close()
else:
print("Check your input")
elif client == '3':
print(" 1.Exercise
", "2.Diet")
task = input("Choose your task: ")
if task == '1':
f = open("Hammad exercise.txt", 'r')
content = f.read()
print(content)
f.close()
if task == '2':
f = open("Hammad diet.txt", 'r')
content = f.read()
print(content)
f.close()
else:
print("Check your input")
else:
print("Check your input")
back = input("Do you want to return to menu?")
back = list(back)
if 'e' in back:
management()
if 'o' in back:
print("See ya!")
management()
4:31 I have a question, can we use os.mkdir()
Ap kaha rehate hoo Harry bhai apse milena hai lockdown ke badha apka fan banagaya huu Hari bhai
Harry bhai please carry on this playlist
Love you sir 😇
Superb video sir👌👌
Harry Bhai Love You Brother From Bangladesh 😍 I have been following you for the last 6 months, You are my role model.
nice keep up this good work mr haris.ali.khan.good work
I needed this thanks bro ❤👍
Thank for a nice simple but very effective project.
Awesome project knowledge and very useful code 😅
You really best 👍💯 at this
best part is where how we can use various modules and their functionality through searching on web. Thanks sir.
bhai you are awesome please make a video on your setup and pc specs
awesome bro excellent work
what a unique application of python
Great work👍👍
Also complete machine learning by adding face recognition and other things
can u please please tell me which software u use to record to ur screen
why [1] is given after splitext means is it syntax? or any specific reason for that?
Bro . Jo Aapne machine learning ka tutorial banaya tha usme marplotlib me attribute error or module no define or many error as the hai .
Why
Great 👍
Harry bhai, kya hum c programme ko use karke chatbot bana sakte hai??
Good job sir... 👍
congratulation harry bhaii subscriber speed 2k/per day
I like it😁😁
harry bhai, Do more content like this
Harry bhai, your course on web development is just amazing.
Please tell if I will be able to design beautiful websites after doing that course??
Yes, definitely
@@CodeWithHarry bhai react.js ke Upar video series banao.....plz
@@CodeWithHarry Thanks for your reply sir!!
I am very grateful to receive reply from such a great personality.
@@CodeWithHarry vo course mai aur banaiye na plz..
Harry Sir is the best
Bhai python se data structures and algorithms ka course laa do
Sir how to learn to build Android roms or gsi image????
If we code for folder selection in this code, i think it will eliminate the process to copy main.py in each path.
Aapne usme python 3.7.1 use Kiya hai or pucharm 2018 but 2020 updated version me bhut error aa rhe hai. Koi bhi program run nhi hi rha hai. Kya kre ?
Prashant Panchal
You are the best proggeammer
bro i am confused between pycharm and vs code please suggest me!!!!
I am getting permission error [ win error 5 ] access is denied.
I try to run the script through administrator but it is not working. Please try to help me here.
Harry bhai please complete the c++ series
Instead of using *If Statement* at 5:30 you can use *exist_ok=True*
You are a genius!!!
hi, Disha here.
I am doing python by ur beginner python course.
I am confused in an exercise given by you.Its a pyramid problem. Kindly check it and reply too.
n=int(input("enter n:"))
p=input("enter ch")
if p=='t' :
for i in range(1,n+1,1):
for j in range(i):
print("*",end="")
print()
elif p=='f':
for i in range(n,0,-1):
for j in range(i):
print("*",end="")
print()
It's just an amazing python project .your explanation was so interesting and easy to understand everyone. Great job 👏👏👏
hey harry! I did this project bt in my way :D my code is:
import os
def create_if_doesnt_exist(folder):
# A function to create a folder if it doesn't exist already
if not os.path.exists(folder):
os.makedirs(folder)
def move(foldername, files):
# A function to move the files to the folder it belongs.
for file in files:
os.replace(file, f"{foldername}/{file}")
def take_file_extension(exts):
# a function to get the file extension
return [file for file in files if os.path.splitext(file)[1].lower() in exts]
files = os.listdir() # taking the file names in a list
files.remove("Automatic Folder cleaner.py")
imgExts = [".png", ".jpg", ".jpeg"]
images = take_file_extension(exts=imgExts)
docExts = [".txt", ".docx", ".doc", ".pdf"]
documents = take_file_extension(exts=docExts)
torrExts = [".torrent"]
torrents = take_file_extension(exts=torrExts)
# taking the files according to their extensions. extensions are registered in a list
create_if_doesnt_exist('images')
create_if_doesnt_exist('docs')
create_if_doesnt_exist('torrents')
create_if_doesnt_exist('others')
others = []
for file in files:
ext = os.path.splitext(file)[1].lower()
if (ext not in imgExts) and (ext not in docExts) and (ext not in torrExts):
others.append(file)
move("images", images)
move("docs", documents)
move("torrents", torrents)
move("others", others)
While moving into another folder using function I am facing this error" TypeError: replace: src should be string, bytes or os.PathLike, not list". But if I do it manually without using move function then it's fine . What should I do ?
Bhai FLUTTER ki tutorial leke aao
Thank you so much
You always make videos which are good for us to easily understand
Harry Bhai , ap ka Shaktiman wala intro dalo new video me , swayang Mukesh Khanna vi Sharma jayega
Harry Bhai jb se aap ka channel Mila hai mujhe 4 month me zero se hero ho gya hu
Harry bhaiya/sir you are best;
By the way
I am learning c from your videos 💙 ;
you arebthe best sir
Awesome Harry bhai
Wow sir really amazing content .
I ansh
From Haryana
Good good sir..lage rahoo
Harry sir, please make more video of this kind regarding real life industry production based video using python
thankyou bhai
Thanks a lot Harry
How does a server machine get logs of ip addresses of clients which connect to server
Amazing bro.....its run
Hello bro
I'm new in your channel.....?
I'm confused.......
Which language is best to learn to make a Computer Operating System.......?
Can you help me please which language . I learned to make an operating system.
Please bro please help me
Great project
hi sir i am your big fan plz reply me
Bhai apki website pe contact me waala option kaam nahi kar raha, aapko contact karna tha, nahi ho raha
Sir, ds algo for beginners to advance
Mere program me media folder me media files nahi ja rahi hai aur error message de raha hai - " replace: src should be string,bytes or is. PathLike , not list" ye error aa raha hai
pls make other projects using python like this pls
How can we make subfolders inside a folder which is made using os module so that our folders can be segregated more deeply?
Harry bhai jai ho python ki jai ho
New version Android studio me quzis type app सिखाईए plz.....