“Programa de Python para obtener el tamaño del archivo de un archivo simple.” Código de respuesta

Python Get Tamaño del archivo

import os

# get size in bytes
path = 'path/to/file.txt'
size = os.path.getsize(path)
The Nic

Programa de Python para obtener el tamaño del archivo de un archivo simple.

import os
filepath='file1.txt'
size=os.path.getsize(filepath)
print(str(size) + ' Bytes')
Man

Cómo verificar el tamaño de un archivo en Python

import os
the_file_that_you_Want_to_check_the_size = os.path.getsize("The file Name")
print(the_file_that_you_Want_to_check_the_size)
# Your result #
Defeated Dove

Respuestas similares a “Programa de Python para obtener el tamaño del archivo de un archivo simple.”

Preguntas similares a “Programa de Python para obtener el tamaño del archivo de un archivo simple.”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código