Python Forum
Help to find the largest int number in a file directory
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help to find the largest int number in a file directory
#1
Question 
Hi, i am a little bit newbie in programming python. I have this problem:

I want to python give me the max value (integer) of a directory folder, the files are with .txt extension . For example i have this path:
[Image: GcJXNgS.png]

inside the hghg folder there are this files
[Image: Qwz6B5E.png]

I want python give me the highest number of the file without (22)
the result in this case will be 39 because is de highest number but i cant get it

all the codes I tried failed. Can you help me with this task?

Sorry for my english.

regards
Reply
#2
What have you as tried and what have you done to try and understand why your attempts didn't work?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  FileNotFoundError: [Errno 2] No such file or directory although the file exists Arnibandyo 0 793 Aug-12-2024, 09:11 AM
Last Post: Arnibandyo
  "[Errno 2] No such file or directory" (.py file) IbrahimBennani 13 6,066 Jun-17-2024, 12:26 AM
Last Post: AdamHensley
  find the sum of a series of values that equal a number ancorte 1 1,074 Oct-30-2023, 05:41 AM
Last Post: Gribouillis
  FileNotFoundError: [WinError 2] The system cannot find the file specified NewBiee 2 2,988 Jul-31-2023, 11:42 AM
Last Post: deanhystad
  Using pyinstaller with .ui GUI files - No such file or directory error diver999 3 7,573 Jun-27-2023, 01:17 PM
Last Post: diver999
  find random numbers that are = to the first 2 number of a list. Frankduc 23 6,875 Apr-05-2023, 07:36 PM
Last Post: Frankduc
  Cannot find py credentials file standenman 5 3,146 Feb-25-2023, 08:30 PM
Last Post: Jeff900
  selenium can't find a file in my desk ? SouAmego22 0 1,221 Feb-14-2023, 03:21 PM
Last Post: SouAmego22
  Extract file only (without a directory it is in) from ZIPIP tester_V 1 3,782 Jan-23-2023, 04:56 AM
Last Post: deanhystad
Thumbs Up Need to compare the Excel file name with a directory text file. veeran1991 1 1,969 Dec-15-2022, 04:32 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020