File Organizing with Python: Rename, Move, Copy & Delete Files and Folders

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ส.ค. 2024
  • Automate File Organization in Python: Learn how to Rename, Move, Copy & Delete Files and Folders.
    Code: github.com/pat...
    Cron Job Tutorial: • How To Schedule Python...
    Get my Free NumPy Handbook:
    www.python-eng...
    ✅ Write cleaner code with Sourcery, instant refactoring suggestions in VS Code & PyCharm: sourcery.ai/?u... *
    ⭐ Join Our Discord : / discord
    📓 ML Notebooks available on Patreon:
    / patrickloeber
    If you enjoyed this video, please subscribe to the channel:
    ▶️ : / @patloeber
    ~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
    🖥️ Website: www.python-eng...
    🐦 Twitter - / patloeber
    ✉️ Newsletter - www.python-eng...
    📸 Instagram - / patloeber
    🦾 Discord: / discord
    ▶️ Subscribe: / @patloeber
    ~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~
    🅿 Patreon - / patrickloeber
    #python
    Folder icons created by Freepik - Flaticon: www.flaticon.c...
    ----------------------------------------------------------------------------------------------------------
    * This is an affiliate link. By clicking on it you will not have any additional costs, instead you will support me and my project. Thank you so much for the support! 🙏

ความคิดเห็น • 40

  • @TheSuperUser
    @TheSuperUser 2 ปีที่แล้ว +8

    Great video on how to use Python for day to day tasks. Thank you. Please make more of these types of "system admin" videos.👍

  • @lumberapple8820
    @lumberapple8820 หลายเดือนก่อน

    Rename 0:00
    Move 6:48
    Copy: 8:43
    Delete 9:28

  • @SatishSingh-cp3wo
    @SatishSingh-cp3wo ปีที่แล้ว

    wish u had made this video 6 months ago. i have already figured out all this but it took me a lot of digging.

  • @cimplyllc
    @cimplyllc ปีที่แล้ว

    Very nice tutorial. Thank you for making it. The final cleanup script is a good way to close out the video.

  • @Knight8365
    @Knight8365 2 ปีที่แล้ว +2

    Thank you and more like this please! I've just been trying to implement a recursive folder search, remove or rename in Bash and it had me tearing my hair out. It would have been much simpler in Python.

  • @Max90662
    @Max90662 7 หลายเดือนก่อน

    Dieses Toturial ist total klasse, vielen Dank

  • @oddzhang
    @oddzhang 2 ปีที่แล้ว +2

    it's great.previous time I have used os module to deal with my video files, such as rename,move,etc.but my code was too tricky to read and not easy to rebuild.this video inspire me to modify my code!

    • @shasvat0
      @shasvat0 ปีที่แล้ว

      why change it if it worked

    • @duduza1
      @duduza1 7 หลายเดือนก่อน

      @@shasvat0 XD

  • @hadadwasiim8248
    @hadadwasiim8248 2 ปีที่แล้ว

    Nice video. This helped me a lot in renaming and moving files and also to add exceptions if file can`t be moved and renamed. :)

  • @dhirajp4677
    @dhirajp4677 2 ปีที่แล้ว

    Thank you Patrick..it was very informative..hoping to see a Playlist of file handling videos..

  • @bachphan1160
    @bachphan1160 ปีที่แล้ว

    very nice and useful, your tutorial is so simple ! thank you. Loved it

  • @RRDGamer
    @RRDGamer ปีที่แล้ว

    Thank you so much for this simple tutorial

  • @sheikhakbar2067
    @sheikhakbar2067 2 ปีที่แล้ว

    Liked; already a subscriber; and saved to my python useful tips and tricks playlist!

  • @bachirgab3084
    @bachirgab3084 10 หลายเดือนก่อน +1

    thanks for this lessons

  • @VRchitecture
    @VRchitecture ปีที่แล้ว

    It’s better to convert your file’s extension to lower case before type checking, since there could be MP4 and mp4 on desktop

  • @minanabil1035
    @minanabil1035 2 ปีที่แล้ว

    WOW
    new for me.
    thanks for the video

  • @VinodKRamachandra
    @VinodKRamachandra 2 ปีที่แล้ว

    Very nice tutorial. Thank you

    • @patloeber
      @patloeber  2 ปีที่แล้ว

      Glad it was helpful!

  • @blackmane1999
    @blackmane1999 2 ปีที่แล้ว +1

    Could u please do a video on ONVIF for python? Thatd be a great help!

  • @abdellahelguermez3786
    @abdellahelguermez3786 2 ปีที่แล้ว +1

    Thank u 🙏🏻

  • @kk5592
    @kk5592 2 ปีที่แล้ว +3

    which IDE do you use?

  • @niteshnunia8293
    @niteshnunia8293 2 ปีที่แล้ว

    Thanks really useful.

  • @anirbanc88
    @anirbanc88 2 ปีที่แล้ว

    its awesome!

  • @paulorosado6888
    @paulorosado6888 ปีที่แล้ว

    Thanks, bro

  • @ivarc256
    @ivarc256 2 ปีที่แล้ว

    Haaa, beautiful.
    thank you

  • @jigarhathiyani
    @jigarhathiyani 2 ปีที่แล้ว

    Thank you for the tutorial
    Can you please help me with this - how to copy specifiy list of files from one folder to another (if we dont have complete name of the file)

  • @serychristianrenaud
    @serychristianrenaud 2 ปีที่แล้ว

    Thank ... 👏

  • @bayuganspride
    @bayuganspride 2 ปีที่แล้ว

    kewl

  • @__________________________6910
    @__________________________6910 2 ปีที่แล้ว

    Noice 😃

  • @toyomade
    @toyomade ปีที่แล้ว

    How would this handle a window’s indexing error?
    While using an unlocked Veracrypt container, power was lost. It’s not repairable and the files are still there and can be opened but when trying to copy them off, an error gets generated after every single one requiring a click. While using native copy/paste functions in Windows.
    This wouldn’t be so bad if this was a handful of files, or even a few hundred, I could make an afternoon out of it and just get it done. However, we’re talking thousands of files here. Basically photos of my kids entire childhoods.
    I really don’t want to lose them but it’s incredibly annoying to manually pull them off.
    And I no longer use Veracrypt unless I have battery backup

  • @ivarc256
    @ivarc256 2 ปีที่แล้ว

    Ok!
    wish you make one for an.ordering. system.. thanks

  • @Kaviranghari
    @Kaviranghari 2 หลายเดือนก่อน

    How can i copy an image to my clipboard using python

  • @kvelez
    @kvelez 9 หลายเดือนก่อน +1

    import os
    print("FileName || Extension")
    for file in os.listdir():
    name, ext = os.path.splitext(file)
    name_split = name.split('-')
    ext_split = ext.split('-')
    print(f"{name_split}{ext_split}")
    ==============================
    import os
    print("FileName || Extension")
    for file in os.listdir():
    name, ext = os.path.splitext(file)
    splitted = name.split("-")
    splitted = [s.strip() for s in splitted]
    new_name = f"{splitted[0]}{ext}"
    print(new_name)

  • @economicblast
    @economicblast 8 หลายเดือนก่อน

    it's saying name isn't identified. idk how you ran the code without identifying the name

  • @NexInspireHub
    @NexInspireHub 2 หลายเดือนก่อน

    which theme is this?

  • @ericbroun4657
    @ericbroun4657 2 ปีที่แล้ว

    ❤❤❤❤❤

  • @gabrielalmeida6085
    @gabrielalmeida6085 2 ปีที่แล้ว

    What is your macbook model?

  • @umeleumab.marcus8497
    @umeleumab.marcus8497 2 ปีที่แล้ว

    Poor color choice, difficult to read at first instance.