Skip to main content
Nintex Community Menu Bar

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

  • February 27, 2020
  • 2 replies
  • 121 views

  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.

 

 

2 replies

  • August 29, 2022

Very well. Thank you!


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

How to solve it?