Skip to main content
Nintex Community Menu Bar

How to get the size of a file (Python script)?

  • February 27, 2020
  • 2 replies
  • 57 views
  • Translate

  1. Set the file Path and name into a variable.
  2. Escape the backslash characters by replacing """ with "\"
  3. Run the following python script
  4. 25706i5E10B05998A2602D.jpg
  5. Note that the file path and name must be placed within double quotes to avoid syntax error.
  6. The resulting file size will be in bytes.
  7. To convert the file size to MB, do a division by 1024.

 

 

Did this topic help you find an answer to your question?

2 replies

  • 0 replies
  • August 29, 2022

Very well. Thank you!

Translate

Forum|alt.badge.img+2
  • Rookie
  • 7 replies
  • August 29, 2022

How to solve it?

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings