Skip to main content
Nintex Community Menu Bar

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

  • Feb 27, 2020 9:20 AM UTC
  • 2 replies
  • 138 views
  • Translate All

  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

  • Aug 29, 2022 1:04 PM UTC

Very well. Thank you!

Translate

Forum|alt.badge.img+2
  • Rookie
  • Aug 29, 2022 1:04 PM UTC

How to solve it?

Translate