When using GitHub and Google Drive simultaneously, an issue arose.
I was having some trouble with a lots of "desktop.ini" files that was auto generated by Google Drive app in my PC. So I wrote this simple code to delete them in a given folder. And as it took some time to scan some folders, I had given a try in multi threading stuff, so I can see the program still running.
-Make sure you have Python installed on your system.
-Open a terminal or command prompt and navigate to the project directory.
-Run the program by executing the following command:
your_program_name.py
-You will be prompted to enter the directory path to scan and the name of the file to delete.
For example:
> Which directory do you want to scan?
C:\\Users\\YourUsername\\Desktop\\Folder
> What is the name of the file?
desktop.ini
-The program will start scanning the specified directory.
-It will display a scanning animation while running.
-After scanning, it will inform you about the total number of files scanned.
-If files are found, it will ask for confirmation before deleting them.
Check the terminal for messages about the deleted files and the total number of files deleted.
GitHub ve Google Drive'ı aynı anda kullanırken bir sorunla karşılaştım. Bilgisayarımın Google Drive uygulaması tarafından otomatik olarak oluşturulan birçok "desktop.ini" dosyasıyla ilgili sorun yaşadım. Bu dosyaları belirli bir klasörde silmek için bu basit kodu yazdım. Ve bazı klasörleri taramak biraz zaman aldığı için çoklu iş parçacığı denemek istedim, böylece programın hala çalıştığını görebilirim.
-Sistem üzerine Python yüklü olduğundan emin olun.
-Bir terminal veya komut istemcisini açın ve proje dizinine gidin.
-Aşağıdaki komutu çalıştırarak programı başlatın:
your_program_name.py
-Klasörü taramak için dizin yolunu ve silinecek dosyanın adını girmeniz istenecektir.
Örneğin:
> Hangi dizini taramak istiyorsunuz?
C:\\Users\\KullanıcıAdınız\\Masaüstü\\Klasör
> Dosyanın adı nedir?
desktop.ini
-Program belirtilen dizini taramaya başlayacak.
-Çalışırken bir tarama animasyonu gösterecek.
-Tarama bittikten sonra taranan toplam dosya sayısı hakkında sizi bilgilendirecek.
-Eğer dosyalar bulunursa, bunları silmeden önce onay isteyecek.
Silinen dosyalar ve silinen toplam dosya sayısı hakkındaki mesajlar için terminali kontrol edin.