def organiser(path, file, format): import os f=open(file) os.chdir(path) i=1 for file1 in os.listdir(path): if file1 not in f: os.rename(file1, file1.capitalize()) for file2 in os.listdir(path): if format in file2: os.rename(f"{file2}", f"{i}.{format}") i=i+1
I tried my best and implemented in my own ways -: def findAllFilesInFolder(): i=1 files=os.scandir("New Folder/test_dir") for every_file in files: print(every_file) forCaptilizationPurpose=str(every_file) forCaptilizationPurpose.capitalize() print(every_file)
with open("New Folder/test_dir/harry.txt") as f: data=f.readline() convertedData=str(data) if convertedData.__contains__("this,that"): print("Invalid operation")
I have done exercises as well as taking reference from others I have made my separate note and separate pycharm project in computer for practice it's long I have completed its been 2.5 month 88 videos
ekdm essay way me solution - import os os.chdir("C:\\Users\mohit\my_expirements_mohit") a1=0 def function(n): global a1 a1 +=1 # comment jo h usser first letter ko capital(upper) ya small(lower) kr skte h # k = n[0].upper()+n[1:] # os.rename(n,k) # is wale se jiste bhi file h usko 1,2,3 jitne bhi file h sbke age ek sequence se # number likh jye to wo krte h essay h bs logic lgana h os.rename(n,str(a1)+n) m1 = os.listdir()
Harry bhaiya you made a mistake in/*for file in files*/ bcz your solution will not fullfill your question. And thnx for making me good in programming so blessed to have you☺
Harry bhai window 7 mein in build folder hai jo rename ne ho skte hunhe try se handle kre ke program banaya hai .. bhai apke program mein ek problem hai apne format ko kesa lya
in soldier function(path, file, format): file- address you use along with ext.txt file what does that ext.txt file contain if anyone know plz explain it
ni yr solve to krra hu bus i think ki ye series ab end hoye to mai next machine learning vali series dekhu teri. isi jaldi me series ke outputs nikal jate h ya samaj jaate h sirf
Hello harry bhai...mere is program me jb me extension wali file ka name change kr rha hu to...vha i ki value to print ho rhi hai....pr formate ki nhi ho rhi.....aisa q instead of correct code.Is there any problem in this code? please reply...... import os def prettyfier(path,safefilelist,format): os.chdir(path) pathfiles=os.listdir(path) i=0 with open(safefilelist,"r") as f: safefile=f.read().split(" ") for file in pathfiles: if safefile not in pathfiles: os.rename(file,file.capitalize()) if os.path.splitext(file)[1] == format: os.rename(file, f"{i}{format}") i+=1
harry bhai mera app path input se leta hai aur extension jisko rename karna hai vo bhi input se leta hai bhai bahut time laga tha banane me pls check kar lena import time import os def prettier(path,efiles,rfiles): global isthere pathfd=path count=1 countf=count os.chdir(pathfd) filestorename=os.listdir(pathfd) for i in range(len(filestorename)): text=str(filestorename[i]) print(text) if text.endswith(rfiles): print("Ok sir doing") # time.sleep(0.4) os.rename(f"{text}",f"{countf}{rfiles}") countf+=1 print("Done sir you can go and check") if text.endswith(efiles): print("Ok sir doing") # time.sleep(0.4) f=open(text,"a") ffr=open(text,"r") ff=ffr.read() ff=ff.split(" ") print(ff) lines=[] for i in range(len(ff)): fg=ff[i] print(fg) lines.append(fg) # print(lines) for debug
# for i in range(len(lines)): fgdd=open(text,"r+") fgdd.truncate(0) fgdd.close() for i in lines: ifl=str(i) ifl=ifl.capitalize() # print(i+" ") for debug f.write(ifl+" ") # print(ff) print("Done sir you can go and check")
pass # count=1 while True: isthere=input("Enter your path -") print(isthere) os.chdir(isthere) iftheref=os.path.exists(isthere) if iftheref: whichfiletorename = input("Which file extension to rename - ") # print(whichfiletorename) whichfileeditname = input("Which file extension to edit - ") # =input("Which file to capatalize - ") prettier(isthere,whichfileeditname,whichfiletorename) else: print("not present")
Ok Bhai....kabhi kabhi esa lagta hai first nai toh maja nai ata...next time se karunga...And next Exercise TH-cam premiere me Dena Bhai taiyar bete rahunga and first hopaunga.
harry bhai itni saari videos ko like nahi kar paate saabhi log aap koi koi vedios ko combine kar diya karo like oops ko aap ek vedio me convert kar shakte the
Error faced!!!!!!! Reply everyone if has a solution?? Harry bhai jo txt file k andar jo file name hai unko change nhi krna jaisa k question me kha gya hai! but still wo bhi change ho rhi hai. Capitalize ya numbering ho rhi hai files ki! If anyone else face the same issue please reply?
def organiser(path, file, format):
import os
f=open(file)
os.chdir(path)
i=1
for file1 in os.listdir(path):
if file1 not in f:
os.rename(file1, file1.capitalize())
for file2 in os.listdir(path):
if format in file2:
os.rename(f"{file2}", f"{i}.{format}")
i=i+1
Harry bhai, Exercises karne me jyada explore hota hai Modules, Concepts etc.. Really amazing Exercises you are giving to us....
Really impressed with this tutorial. I have gone through almost all the videos here and really liked them. Thank you very much for the tutorial. :)
Bhai 25dec 2020 ko dekh rha hu.. or
1st language h meri ye .... Mko kuch ni pta tha .. but bht kuch sikha 😍😍😍..
I tried my best and implemented in my own ways -:
def findAllFilesInFolder():
i=1
files=os.scandir("New Folder/test_dir")
for every_file in files:
print(every_file)
forCaptilizationPurpose=str(every_file)
forCaptilizationPurpose.capitalize()
print(every_file)
with open("New Folder/test_dir/harry.txt") as f:
data=f.readline()
convertedData=str(data)
if convertedData.__contains__("this,that"):
print("Invalid operation")
else:
oldFile=every_file
fsf=os.rename(oldFile,'myfile.txt')
print(fsf)
f.close()
findAllFilesInFolder()
I have done exercises as well as taking reference from others I have made my separate note and separate pycharm project in computer for practice it's long I have completed its been 2.5 month 88 videos
i've learned a lot by your hard effort harry sir.
Thank you Harry bhai for this amazing course.Really appreciate it bro❤
Awsome bhai🤓❤
THANK YOU HARRY BHAI
Thank you so much Harry Bhai♥️♥️
ekdm essay way me solution -
import os
os.chdir("C:\\Users\mohit\my_expirements_mohit")
a1=0
def function(n):
global a1
a1 +=1
# comment jo h usser first letter ko capital(upper) ya small(lower) kr skte h
# k = n[0].upper()+n[1:]
# os.rename(n,k)
# is wale se jiste bhi file h usko 1,2,3 jitne bhi file h sbke age ek sequence se
# number likh jye to wo krte h essay h bs logic lgana h
os.rename(n,str(a1)+n)
m1 = os.listdir()
Thank you Harry Bhai
Harry bhai zindabad
Watching tutorial after 1 year and doing all exercises
Bhai jab apne pheli bar dekhi kya jab aapse nhi bani thi
Same problem with me.
@@mr.student5805 nhi bhai mene playlist hi abhi dekhna start kiya tha mujhe idea nhi tha pehle ki playlist bhi h
@@jaibhansinghgaur1953 bhai aapki first language hai kya ye
@@mr.student5805 nhi bhai C bhi sikh rhi h mene mtlb mujhe python pehle se bhi aati thi basic , mujhe advanced tk sikhna tha isliye
same :')
Sir you are great you help me a lot
Best job
best series
Thnxx bhai ✌️👍
bhai aap great ho yrr
please dont worry
love you bhai
Harry bhaiya you made a mistake in/*for file in files*/ bcz your solution will not fullfill your question. And thnx for making me good in programming so blessed to have you☺
bro u are great
Waiting for.. Big data ...
Harry sir ji
I watched all your python series videos
By Commenting I am just doing an interaction so TH-cam Will Recommend More People
U are the best bro
i like your efforts harry bhai
Harry bahi u r great
Thank you so much brother
Thank you so much harry sir!!!!!!!!!!
bhai ye ext.txt file location kis lie deni padi hame??? ye ext,txt file banay hi kiyun hamne...??
Harry bhai window 7 mein in build folder hai jo rename ne ho skte hunhe try se handle kre ke program banaya hai .. bhai apke program mein ek problem hai apne format ko kesa lya
Hello harry bhai big fan
Its normal ❤️
What is your favorite programming language Harry sir ????
Nice
Best excrsie
Oh Bhai sahi
👌👌👌🤩🤩🤩
Harry bhai op
in soldier function(path, file, format):
file- address you use along with ext.txt file
what does that ext.txt file contain
if anyone know plz explain it
ni yr solve to krra hu bus i think ki ye series ab end hoye to mai next machine learning vali series dekhu teri. isi jaldi me series ke outputs nikal jate h ya samaj jaate h sirf
Good morning bhai
Hello harry bhai...mere is program me jb me extension wali file ka name change kr rha hu to...vha i ki value to print ho rhi hai....pr formate ki nhi ho rhi.....aisa q instead of correct code.Is there any problem in this code? please reply......
import os
def prettyfier(path,safefilelist,format):
os.chdir(path)
pathfiles=os.listdir(path)
i=0
with open(safefilelist,"r") as f:
safefile=f.read().split("
")
for file in pathfiles:
if safefile not in pathfiles:
os.rename(file,file.capitalize())
if os.path.splitext(file)[1] == format:
os.rename(file, f"{i}{format}")
i+=1
Harry bhai sad op
harry bhai mera app path input se leta hai aur extension jisko rename karna hai vo bhi input se leta hai bhai bahut time laga tha banane me pls check kar lena
import time
import os
def prettier(path,efiles,rfiles):
global isthere
pathfd=path
count=1
countf=count
os.chdir(pathfd)
filestorename=os.listdir(pathfd)
for i in range(len(filestorename)):
text=str(filestorename[i])
print(text)
if text.endswith(rfiles):
print("Ok sir doing")
# time.sleep(0.4)
os.rename(f"{text}",f"{countf}{rfiles}")
countf+=1
print("Done sir you can go and check")
if text.endswith(efiles):
print("Ok sir doing")
# time.sleep(0.4)
f=open(text,"a")
ffr=open(text,"r")
ff=ffr.read()
ff=ff.split("
")
print(ff)
lines=[]
for i in range(len(ff)):
fg=ff[i]
print(fg)
lines.append(fg)
# print(lines) for debug
# for i in range(len(lines)):
fgdd=open(text,"r+")
fgdd.truncate(0)
fgdd.close()
for i in lines:
ifl=str(i)
ifl=ifl.capitalize()
# print(i+"
") for debug
f.write(ifl+"
")
# print(ff)
print("Done sir you can go and check")
pass
# count=1
while True:
isthere=input("Enter your path -")
print(isthere)
os.chdir(isthere)
iftheref=os.path.exists(isthere)
if iftheref:
whichfiletorename = input("Which file extension to rename - ")
# print(whichfiletorename)
whichfileeditname = input("Which file extension to edit - ")
# =input("Which file to capatalize - ")
prettier(isthere,whichfileeditname,whichfiletorename)
else:
print("not present")
Ok Bhai....kabhi kabhi esa lagta hai first nai toh maja nai ata...next time se karunga...And next Exercise TH-cam premiere me Dena Bhai taiyar bete rahunga and first hopaunga.
Can you please tell how can I apply this code in pydroid 3 .....please sir tell me.......🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
Hiiiiiiiiiii
I am your big fan
harry bhai itni saari videos ko like nahi kar paate saabhi log
aap koi koi vedios ko combine kar diya karo
like oops ko aap ek vedio me convert kar shakte the
Continue watching all vedios
3:29
I think we all should listen him as he is doing all efforts just for us .
harry bhai i stuck in name , name_ is not defined errror harry bhai please reply me
there is no rply coming just post your all code here in comment and see if we can fix it
From starting i solved every problem given by harry but dont know why🤷♂️ i am getting confuse here
I'm also 😣
Waiting For Tkinter video Now!
Mai hamesa commant kr te h
Its very tough! I don't know why
Bhai thoda apni voice speed bhi kam Karo bhut jaldi finish krte ho.
Sir ma commerce ka student hu or keya ma python learn karke koe IT sector ma job ke lea interview de sakta hu ??
Mera ek saval hai
Python language se app ko kaha banate hai pycharm ya android studio mai?
Python se Android apps nahi bana sakte
@@ThugLife-ud3ff possible
bhai ye install process kya hai kisi application ka
Sir g ye ext.txt file q banai ha... Ye aap ny clear nh bataya
Sir kuch doubt hai ,concept clear nahi ho paa raha hu ,but I am learning after 1 year .kya karu😭😭😭
Same😭
bhai apke exercises thode tough hote hai isiliye hum ker nhi pate , hum try kerte per kuch aur he ho jata hai
Bhai main karuga interactions
ok
Actually Maine abhi puri tutorial series starting se complete nhi kiya esliye jaisi hi series complete hojygi tab hr ek quiz solve krunga promise
Hlo harry
vai mujhe kuch samaj nehi aya
meh directory file in sab cheez me clear hona chati ho
or kabhi kabhi yr solve ni hoti errors aa jate h to solution dekh ke fr bnate h outputs
sir ye code chlane pr permission denied error kyu bta rha hai?😭😭
Bro are you using mac
Solve kar raha hun
Kuch samaj hi nahi aah raha hai 😥😓 😭
i was unable to understand the question
Error faced!!!!!!! Reply everyone if has a solution??
Harry bhai jo txt file k andar jo file name hai unko change nhi krna jaisa k question me kha gya hai! but still wo bhi change ho rhi hai. Capitalize ya numbering ho rhi hai files ki!
If anyone else face the same issue please reply?
Yes SO I have CHanged File to os.path.splitext()[0]
consider the full name with extension in txt file
But Harry bhai ne bola tha ki folder ko koi change nehi karna...but capitalize ho rha hei
__name__
Bhai explain tu kr na jo likh rahy ho bs usi ko par rahy ho is ma format kya kuch samjayo gy
❤❤❤❤❤💝💝💝💝💝💝💝💝💖💖💖💖💓💓💞💞💕
__hello__
Bhai exams chal rha tha time nhi milta tha comment karne ka ab exams khatm ho gaye toh ab karunga bhai
___name___
Bhai ek dil dedoo
bhai ab aapke videos jyada samajh me nahi aate hain, ye wali exercise bhi samajh nahi aayi ...
Bhai mera ek help karoge ?
ji harry bhai sorry aage se aisa nahi hoga
;)
advanced python is so difficult, I don't understand it
Bhai app se bhat karni he please no mail karo na it is about my django based website please bhai
I also need some help.
Bhai abb se mai hamesha exercise solve karunga abhi mai bahar tha isliye mai solve nahi kar paaya
*SORRY*
I m stuck in FileNotFoundError..so who can help please ping me
Bhai main 1 hi like de Paya is video pe 😣
__fname__
__
Comment karte hai Harry bhai Aisa kya
sorry harry bhai, i couldnt make this solution
Thank you harry vaii !!!!