#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default Copyfolder

Hi!
I use copyfolder in filesystemobject its working allright i'm happy
but if i copy a folder from a cd. the attribute on the folder gets to
read only and then i can't use copy folder next time, because i don't have
the permission to do this. Is there a way with the caommand copyfolder where
i can set the folder to bee read and write ??

Regards alvin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copyfolder

use something like

SetAttr "C:\MyFolder\*.*", vbNormal

--
Regards,
Tom Ogilvy

"Alvin Hansen" wrote in message
...
Hi!
I use copyfolder in filesystemobject its working allright i'm happy
but if i copy a folder from a cd. the attribute on the folder gets to
read only and then i can't use copy folder next time, because i don't have
the permission to do this. Is there a way with the caommand copyfolder

where
i can set the folder to bee read and write ??

Regards alvin



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default Copyfolder

Hi
Tom i hav try but get an error
"BAd file name or number" my code is:
SetAttr "c:\" & tt & tal & kur1 & "\*.*", vbNormal

Before you write i try this
Set f = fso.GetFolder(fso.GetFolder("c:\" & tt & tal & kur1))
f.Attributes = 0
Set fs = fso.GetFile(fso.GetFile("c:\" & tt & tal & kur1 & "\*.*"))
fs.Attributes = 0

Well its working if i instead of *.* write filename.xls. but thats not good
for i dont know the file name nomally.


Reagrds alvin

"Tom Ogilvy" skrev:

use something like

SetAttr "C:\MyFolder\*.*", vbNormal

--
Regards,
Tom Ogilvy

"Alvin Hansen" wrote in message
...
Hi!
I use copyfolder in filesystemobject its working allright i'm happy
but if i copy a folder from a cd. the attribute on the folder gets to
read only and then i can't use copy folder next time, because i don't have
the permission to do this. Is there a way with the caommand copyfolder

where
i can set the folder to bee read and write ??

Regards alvin




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default Copyfolder

Me again
this working
SetAttr "c:\" & tt & tal & kur1 & "\valutatabel.xls", vbNormal
but this not working
SetAttr "c:\" & tt & tal & kur1 & "\*.*", vbNormal


regards alvin

"Tom Ogilvy" skrev:

use something like

SetAttr "C:\MyFolder\*.*", vbNormal

--
Regards,
Tom Ogilvy

"Alvin Hansen" wrote in message
...
Hi!
I use copyfolder in filesystemobject its working allright i'm happy
but if i copy a folder from a cd. the attribute on the folder gets to
read only and then i can't use copy folder next time, because i don't have
the permission to do this. Is there a way with the caommand copyfolder

where
i can set the folder to bee read and write ??

Regards alvin




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copyfolder

then I guess you will need to loop through your list of files. I many of
these accept wildcards, just like the DOS equivalent. I haven't tested it.

--
Regards,
Tom Ogilvy



"Alvin Hansen" wrote in message
...
Me again
this working
SetAttr "c:\" & tt & tal & kur1 & "\valutatabel.xls", vbNormal
but this not working
SetAttr "c:\" & tt & tal & kur1 & "\*.*", vbNormal


regards alvin

"Tom Ogilvy" skrev:

use something like

SetAttr "C:\MyFolder\*.*", vbNormal

--
Regards,
Tom Ogilvy

"Alvin Hansen" wrote in message
...
Hi!
I use copyfolder in filesystemobject its working allright i'm happy
but if i copy a folder from a cd. the attribute on the folder gets to
read only and then i can't use copy folder next time, because i don't

have
the permission to do this. Is there a way with the caommand copyfolder

where
i can set the folder to bee read and write ??

Regards alvin






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CopyFolder Neil[_6_] Excel Programming 4 July 11th 03 04:57 PM


All times are GMT +1. The time now is 12:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"