Skip to content

Commit

Permalink
Folder Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshlinux committed Nov 30, 2019
1 parent 9254292 commit 753befa
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 9 deletions.
4 changes: 2 additions & 2 deletions database/delete_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#-------------------------------------------------------------------------------

import MySQLdb
db = MySQLdb.connect("localhost","root","","cable")
db = MySQLdb.connect("localhost","root","","binarynote")
cursor = db.cursor()
name = input("Enter any name : ")
sql ="delete from customer where name like '%" + name + "';"
sql ="delete from user where uname like '%" + name + "';"
cursor.execute(sql)
db.commit()
db.close()
Expand Down
1 change: 1 addition & 0 deletions fileHandling/delete_duplicate_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import glob
import tkinter as tk
from tkinter import filedialog

count=0
root = tk.Tk()
root.withdraw()
Expand Down
21 changes: 17 additions & 4 deletions fileHandling/folderManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
# made by : rakesh kumar
# last compiled on : 30/11/2019


import os
import os.path
from os import path
import sys
import shutil
import tkinter as tk
from tkinter import filedialog
import tkinter.messagebox


source = r'C:\Users\rakesh\Documents'

Expand All @@ -15,7 +18,7 @@
'img': ['jpg', 'jpeg', 'png', 'gif', 'bmp'],
'exe': ['zip', 'rar', 'exe'],
'prg': ['py', 'cpp', 'php'],
'music': ['mp3', 'mp4', 'mkv', 'wmv', '3gp', 'avi', 'mov', 'aac', 'flv', 'ogg', 'ogb', 'yuv', 'mpg']
'music': ['mp3', 'mp4', 'mkv', 'wmv', '3gp', 'avi', 'mov', 'aac', 'flv', 'mpg']
}


Expand All @@ -31,8 +34,18 @@ def filemove(file, filetype, key):
pass


for root, folder, files in os.walk(source):
root = tk.Tk()
root.withdraw()
sourcedir = filedialog.askdirectory() # source folder
if not sourcedir.strip():
print("Folder Error...User did not selected any folder")
#rootdir = 'C:\\Users\\ace
sys.exit()

for root, folder, files in os.walk(sourcedir):
for file in files:
for key in filetype.keys():
if(file.split('.')[1]) in filetype[key]:
filemove(file, filetype, key)

tkinter.messagebox.showinfo('Window Title', 'Please check your Folde now')
4 changes: 2 additions & 2 deletions hello.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
if __name__ == '__main__':
for i in range(1,101,3):
print(i)
for i in range(1,24,3):
print(i)
1 change: 1 addition & 0 deletions tempCodeRunnerFile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target_list
1 change: 0 additions & 1 deletion turtle.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import tkinter
from turtle import *
color('red', 'yellow')
begin_fill()
while True:
forward(200)
Expand Down
Binary file modified welcome.mp3
Binary file not shown.

0 comments on commit 753befa

Please sign in to comment.