# 🔧 MOUNT GOOGLE DRIVE AND AUTH
from google.colab import drive
drive.mount('/content/drive')
!pip install -U -q PyDrive
import os
import shutil
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from google.colab import auth
from oauth2client.client import GoogleCredentials
auth.authenticate_user()
gauth = GoogleAuth()
gauth.credentials = GoogleCredentials.get_application_default()
drive_ = GoogleDrive(gauth)
# 📁 ID folder sumber (dari link yang Guru Duan berikan)
source_folder_id = '19qaEHX43JX_q6qV-fg93npXfSuit5eXS'
# 📁 Folder tujuan di My Drive
target_root = "/content/drive/MyDrive/Folder Kelas 12"
os.makedirs(target_root, exist_ok=True)
# 🔁 Fungsi rekursif untuk menyalin isi folder
def copy_folder_recursive(source_id, target_path):
file_list = drive_.ListFile({'q': f"'{source_id}' in parents and trashed=false"}).GetList()
for file1 in file_list:
file_title = file1['title']
file_id = file1['id']
mimetype = file1['mimeType']
if mimetype == 'application/vnd.google-apps.folder':
print(f"📁 Membuat subfolder: {file_title}")
subfolder_path = os.path.join(target_path, file_title)
os.makedirs(subfolder_path, exist_ok=True)
copy_folder_recursive(file_id, subfolder_path)
else:
print(f"⬇️ Mengunduh: {file_title}")
downloaded = drive_.CreateFile({'id': file_id})
try:
downloaded.GetContentFile(file_title)
print(f"⬆️ Menyalin ke Drive: {file_title}")
shutil.copy(file_title, os.path.join(target_path, file_title))
os.remove(file_title)
except:
print(f"⚠️ Gagal mengunduh: {file_title}")
# 🚀 Jalankan penyalinan
print("🚀 Memulai penyalinan folder dan semua isinya ke folder 'Folder Kelas 12'...")
copy_folder_recursive(source_folder_id, target_root)
print("✅ Selesai menyalin semua file dan subfolder.")
Wednesday, 16 July 2025
BOOKMARK
Categories
0ad
(1)
3a
(1)
aac
(1)
adb
(1)
agc
(1)
alien
(1)
amr
(1)
Android
(13)
Antivirus
(45)
AnyDesk
(1)
appimage
(2)
audacity
(1)
autoremove
(17)
Bahan Ajar
(3)
base
(1)
Baterai
(1)
bingai
(1)
bitnami
(1)
Blueman
(1)
Bluetooth
(1)
booklet
(1)
boomaga
(1)
boot
(1)
Booting
(2)
Boxes
(3)
Brasero
(1)
Brave
(2)
browser
(2)
C++
(2)
Calculator
(1)
Calibre
(1)
camera
(1)
canon
(1)
CD
(1)
certbot
(1)
chatgpt
(1)
chmod
(2)
Chrome
(1)
cli
(1)
cloudflare
(7)
colab
(1)
colibre
(1)
color
(1)
Compiz
(2)
conky
(1)
cron
(1)
crossover
(2)
csf
(1)
cups
(6)
curl
(1)
dconf-editor
(1)
debian
(8)
decoder
(1)
disk
(4)
dns
(1)
Docker
(6)
Downloads
(83)
dpkg
(1)
draw
(1)
droidcam
(2)
dunst
(1)
dupeguru
(1)
duplex
(1)
DVD
(1)
Ebook
(1)
Edge
(5)
eduactiv8
(1)
Emerald
(1)
Epson
(5)
error
(1)
exam
(1)
exambro
(1)
exelearning
(4)
exfat
(1)
exfat-utils
(1)
extension
(3)
face-unclok
(1)
face-unlock
(1)
fastboot
(1)
fet
(2)
ffmpeg
(5)
file
(1)
firefox
(1)
firewall
(1)
firewall log
(2)
flameshot
(3)
flash
(2)
flatpak
(4)
folder
(2)
Font
(2)
Fonts
(2)
foto
(1)
Foxitreader
(1)
Franz
(1)
Free Office
(3)
fsck
(1)
ftp
(2)
fuse
(2)
gallery
(2)
Game
(13)
gcam
(3)
gdm3
(1)
gedit
(1)
Geogebra
(1)
gespeaker
(1)
ghostscript
(3)
gimp
(7)
git
(3)
Giveaway
(117)
glaxnimate
(1)
globalmenu
(5)
Gnome
(7)
Gnome Box
(3)
Gnome Boxes
(2)
gnome-remote-desktop
(1)
gnome-shell-extension-manager
(1)
gnome-tweaks
(4)
google cloud
(5)
google drive
(2)
gps
(1)
Gromit-MPX
(1)
grub
(4)
grub-customizer
(1)
GSConnect
(2)
gstreamer
(1)
Gutenprint
(3)
h.264
(1)
Handphone
(11)
hardisk
(2)
hdd
(6)
hide
(4)
Hikmah
(1)
hp
(4)
i3wm
(12)
icons
(1)
image
(1)
imagemagick
(7)
inkscape
(4)
Internet
(44)
ip
(2)
Iriun
(1)
itools
(1)
jq
(1)
jurnalmengajar
(1)
KDEnlive
(5)
kernel
(4)
key
(1)
Key-Mon
(1)
keyworder
(1)
kitty
(1)
Klavaro
(1)
Kolourpaint
(1)
Laptop
(13)
libdvd-pkg
(2)
LibreOffice
(25)
libssl. so.3
(1)
lightdm
(1)
lock
(1)
lowlatency
(3)
lscpu
(1)
lshw
(2)
lsposed
(1)
lsposes
(2)
magisk
(5)
mail
(1)
malware
(1)
manual duplex
(1)
mariadb
(8)
mediainfo
(1)
mesa-utils
(1)
meson
(1)
meta
(1)
micloud
(1)
miui
(3)
mlt
(1)
modem
(1)
mojave
(1)
Moodle
(91)
motorola
(1)
mp280
(1)
mp3
(1)
mpc
(1)
mpd
(1)
mpeg-4
(1)
mpv
(4)
mysql
(11)
nautilus
(1)
ncmpcpp
(1)
net-tools
(1)
netstat
(1)
network-manager
(2)
nginx
(8)
OBS
(5)
Office
(2)
Office 2013
(1)
okular
(2)
optipng
(1)
Orbit Star2
(1)
output
(1)
ownership
(1)
Paint
(1)
panel
(1)
pdf
(9)
pdfcpu
(2)
pdftopmm
(1)
Pengalaman
(6)
photo
(1)
php
(15)
pidgin
(1)
pipewire
(2)
pix
(1)
pixel
(3)
Plank Dock
(3)
playonlinux
(2)
plymouth
(1)
Polybar
(1)
print
(2)
printer
(10)
Printing
(6)
proftpd
(1)
Proxy
(2)
pulseaudio
(2)
purge
(1)
PyMuPDF
(1)
python
(1)
QT app
(1)
rar
(1)
recorder
(1)
Review
(6)
rkhunter
(1)
rofi
(1)
root
(3)
rootkit
(1)
ruby
(4)
samba
(1)
scanner
(2)
scorm
(2)
scratux
(1)
scrcpy
(7)
screen
(2)
screenfetch
(1)
screenshot
(4)
Scribus
(1)
server
(33)
setting
(1)
sgx
(1)
shorcut
(1)
shutterstock
(3)
simplrescreenrecorder
(1)
situs
(1)
SLIMS
(1)
smalipatcher
(3)
Snap
(5)
Snapd
(2)
Softmaker
(4)
Software
(87)
Sonzi
(1)
sound
(1)
speedtest
(2)
Spotify
(3)
SSD
(2)
ssh
(9)
statusbar
(1)
steam
(3)
swap
(1)
synaptic
(1)
Systemd-analyze
(8)
tailscale
(1)
targz
(1)
tela
(1)
Telegram
(1)
termpdf.py
(2)
theme
(2)
thinkpad
(1)
thumbnail
(1)
thunar
(1)
timetable
(1)
Tips
(36)
tmp
(1)
tmpfs
(1)
TRIM
(1)
tunnel
(2)
Tutorial
(22)
tuxtype
(2)
tweak
(1)
TWRP
(1)
Ubuntu
(66)
Ubuntu studio
(1)
ubuntu-restricted-extras
(2)
universalAuth
(1)
unoconv
(2)
unrar
(1)
unzip
(1)
update
(4)
upgradable
(8)
upgrade
(40)
usr
(1)
v4l2loopback-utils
(1)
vcdimager
(1)
ventoy
(1)
video
(3)
vlc
(1)
vps
(1)
warp
(1)
WebKitWebProcess
(1)
wget
(2)
WhatsApp
(5)
WhiteSur
(1)
whyred
(1)
wifi
(4)
wireless
(1)
wordpress
(11)
Workspace
(1)
WPS Office
(8)
xautolock
(1)
xchm
(2)
xclip
(2)
xfce4
(2)
xl
(1)
xorg
(2)
xpad
(2)
xrandr
(1)
youtube-dl
(1)
yt-dlp
(1)
zathura
(2)
Zekr
(1)
zip
(1)
Zoom
(3)
Fisikaku. Powered by Blogger.
Search This Blog
Blog Archive
Popular Posts
-
$ sudo apt install gnome-shell-extensions chrome-gnome-shell [sudo] password for dhwan: Reading package lists... Done Building dependency ...
-
Nature Illusion Studio Standard Edition transforms your nature photos into living works of art with weather effects that are sure to asto...
-
sudo nano /etc/default/grub # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full doc...
0 comments:
Post a Comment