Sign in to follow this  
Followers 0
Steveiwonder

FileGetAttribute / DirCopy bug?

6 posts in this topic

Hello,

While working on a script and testing the DirCopy function i came across this issue...

On Windows you can create a "Briefcase" (Right-Click in a folder > New > Briefcase).

I tried to use DirCopy on that Briefcase as FileGetAttribute returns "RD" (Read-only + Directory). It copies but the copied Breifcase is now corrupt?.

Tried FileCopy too but it does the same thing.

$attrib = FileGetAttrib("C:\New Briefcase")
MsgBox(0, "Attribute", "Attribute: " & $attrib) ; show file/folder attribute

DirCopy("C:\New Briefcase", "C:\testFolder", 1) ; copy the briefcase

Thats just some example code.

a Briefcase is the only file/folder im getting this problem with.

Any ideas?


They call me MrRegExpMan

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

whatever Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

Hrmmm, can one of the autoit developers comment on this please? A bug ? or me being a cock


They call me MrRegExpMan

Share this post


Link to post
Share on other sites

Hrmmm, So how do you copy a briefcase?


They call me MrRegExpMan

Share this post


Link to post
Share on other sites

Anyone?


They call me MrRegExpMan

Share this post


Link to post
Share on other sites

Hello,

While working on a script and testing the DirCopy function i came across this issue...

On Windows you can create a "Briefcase" (Right-Click in a folder > New > Briefcase).

I tried to use DirCopy on that Briefcase as FileGetAttribute returns "RD" (Read-only + Directory). It copies but the copied Breifcase is now corrupt?.

Tried FileCopy too but it does the same thing.

$attrib = FileGetAttrib("C:\New Briefcase")
MsgBox(0, "Attribute", "Attribute: " & $attrib) ; show file/folder attribute

DirCopy("C:\New Briefcase", "C:\testFolder", 1) ; copy the briefcase

Thats just some example code.

a Briefcase is the only file/folder im getting this problem with.

Any ideas?

How about this:

DirCopy("C:\New Briefcase", "C:\testFolder", 1) ; copy the briefcase
FileSetAttrib("C:\testFolder", "+R")

Works like a charm. By the way many special folders ("My Documents", "Favorites") should have their attributes set explicitly in this way, otherwise they appear just like normal directories.

I don't think this is an AutoIt bug. At most you can make a feature request that DirCopy() flags could include "copy attributes" or something.


UDFS & Apps:


DDEML.au3 - DDE Client + Server[*]
Localization.au3- localize your scripts[*]
TLI.au3 - type information on COM objects (TLBINF emulation)[*]
TLBAutoEnum.au3 - auto-import of COM constants (enums)[*]
AU3Automation - export AU3 scripts via COM interfaces
TypeLibInspector

- OleView was yesterday

Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0