Jump to content

Viello

Member
  • Posts

    33
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Viello

  1. 15 hours ago, DemOnJR said:

    for py users

    import os
    
    # function to rename files
    def rename_files(path):
      for dirpath, dirnames, filenames in os.walk(path):
        for filename in filenames:
          # check if filename contains uppercase characters
          if any(c.isupper() for c in filename):
            # rename file to lowercase
            os.rename(os.path.join(dirpath, filename), os.path.join(dirpath, filename.lower()))
    
    # enter the path of the directory to rename files
    path = input("Enter directory path: ")
    rename_files(path)
    
    print("All files have been renamed to lowercase.")

     

    this is an extra option yep but I want to remane specificly .txt files, for users I can recommend them to use this code with a little modify;

    Use a list comprehension instead of the for loop to check if the filename contains uppercase characters.

    Use os.path.splitext() method to get the file extension, and then concatenate it with the lowercase filename.

    Use the r prefix for the input() function to interpret backslashes as part of the path string.

    import os
    
    def rename_files(path):
        # Use os.scandir() instead of os.walk() for better performance
        for entry in os.scandir(path):
            if entry.is_file():
                # Get the filename and extension separately
                filename, ext = os.path.splitext(entry.name)
                if any(c.isupper() for c in filename):
                    # Rename file to lowercase and concatenate the extension
                    new_name = filename.lower() + ext
                    os.rename(entry.path, os.path.join(path, new_name))
    
    # Use the r prefix for the input function to interpret backslashes as part of the path string
    path = input(r"Enter directory path: ")
    rename_files(path)
    
    print("All files have been renamed to lowercase.")

    maybe this could be the my solution for py user,

    thanks for contribution to my topic

  2. With this exe user will enter the adress of the file and all txt type file names will turn into lowercase ones. I created this program because when I make a new map I had files name like MapSetting.txt, AreaAmbianceData.txt and it will cause problem to one of my clients now I can make them lowercase and problem is solved.

    How to use:https://metin2.download/video/4tQiPWzfkd6xa7Lf7417QSHTmhDsgKpk/.mp4

    Mega Link: 

    This is the hidden content, please

    This is the hidden content, please

    • Metin2 Dev 1
    • Good 2
  3. I kinda a newbie to c++, I created an exe which can get tga and dds photos into a new png one, both tga/dds and png copies will be in the same place. exe should be in the same folder with your tga and dds files.

    How to use it:

    Video: https://metin2.download/video/252EVmem51c0N6Id27bqi9yW5tEW16c8/.mp4

    Mega link: 

    This is the hidden content, please

    This is the hidden content, please

     

    Sorry for virus total:https://www.virustotal.com/gui/file/a6c2a5f9c4e7dfb34518bad68455b3c9eb378355b63ea4327cdb16ad741c3c2b?nocache=1

    • Metin2 Dev 25
    • Good 5
    • Love 4
  4. Severity    Code    Description    Project    File    Line    Suppression State
    Error    C1047    The object or library file '..\..\extern\lib\libjpeg-MT.lib' was created by a different version of the compiler than other objects like '..\..\extern\lib\discord_rpc_r.lib'; rebuild all objects and libraries with the same compiler    UserInterface    D:\files\Leg\ClientSource\Client\UserInterface\LINK    1    

    and

    Severity    Code    Description    Project    File    Line    Suppression State
    Error    LNK1257    code generation failed    UserInterface    D:\files\Leg\ClientSource\Client\UserInterface\LINK    1    

    I got this error in vs2022

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.