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

Overwrite read-only file

142 views
Skip to first unread message

Fred

unread,
May 17, 2001, 10:29:07 AM5/17/01
to

Hello everyone,

I was just wondering if there was a way to overwrite an existing read-only
file in vbs? I'm using the CopyFolder method but it stops when it tries to
copy a read-only file over another one..


Thanks

Fred


mayayana1

unread,
May 17, 2001, 11:28:19 AM5/17/01
to
FSO.DeleteFile Filepath, True
( Setting the "force" parameter to true will delete read-only.)

Fred wrote in message ...

Malatesta Marco

unread,
May 17, 2001, 1:54:49 PM5/17/01
to
I take away the read-only attribute before overwriting.

file2.attributes = 0 ' take away the read-only
fso.CopyFile file1, file2 , true

Marco

Fred <neon_r...@hotmail.com> wrote in message
OK$l82t3AHA.1240@tkmsftngp04...

Fred

unread,
May 17, 2001, 4:28:56 PM5/17/01
to
Thanks but it's a scipt and I never know which file is read only or not.. I
was just wondering if there was a command like with "/r" when using xcopy in
vbs!

"Malatesta Marco" <m.mal...@advertown.com> wrote in message
news:usUjowv3AHA.1700@tkmsftngp03...

0 new messages