Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

making a file hidden in win32?

5 views
Skip to first unread message

Peoter Veliki

unread,
Dec 2, 2001, 5:13:46 PM12/2/01
to
 
Is there anyway I can use python to make a file hidden in windows?
 
Thanks

Luke

unread,
Dec 2, 2001, 6:33:08 PM12/2/01
to
why not this

import os
from sys import platform

if platform == "win32":
os.system("attrib +h c:\\spam.txt")

Wolfgang Strobl

unread,
Dec 3, 2001, 2:46:28 PM12/3/01
to
On Sun, 2 Dec 2001 14:13:46 -0800, "Peoter Veliki"
<peoter...@hotmail.com> wrote :

>Is there anyway I can use python to make a file hidden in windows?

import win32api
import win32con
win32api.SetFileAttributes( "c:/scratch/versteck",
win32con.FILE_ATTRIBUTE_HIDDEN )


--
Thank you for observing all safety precautions

0 new messages