Jundullah
Jundullah

Reputation: 113

html file not copied correctly

I have an html file: x.html

I tried copying:

import shutil

shutil.copy("...\x.html", "...\Desktop")

Normal file: 1.image >Working properly.

Copied file: 2.image >Running corrupted.

And I did it with cmd:

copy "...\x.html" "...\Desktop"

Same result again. Is there a way to copy correctly?

Upvotes: 0

Views: 134

Answers (1)

Alonso Mondal
Alonso Mondal

Reputation: 64

Maybe you also need to copy additional files as the CSS or scripts associated to the HTML (?)

Would appreciate code snippets or check the actual code inside the files. If the file opens it probably is not corrupted.

I believe the actual file is being copied correctly, but CSS files and scripts are missing, so the browser doesn't render it the way you want it to.

Upvotes: 2

Related Questions