I see the SetFileAttributes command, but I don't see a way to combine this with the File command.
I'm including all the files and subfolders in a directory like this:
Is there a way to do that, but make all the files hidden?File /r "C:\files\*"
2 posts
Is there a way to do that, but make all the files hidden?File /r "C:\files\*"
${HideAll} $INSTDIR\files true
!macro _HideAll Folder Hide
Push $R0
Push $R1
ClearErrors
FindFirst $R0 $R1 `${Folder}\*.*`
${DoUntil} ${Errors}
${If} $R1 != .
${AndIf} $R1 != ..
!if `${Hide}` == true
SetFileAttributes `${Folder}\$R1` HIDDEN|SYSTEM
!else
SetFileAttributes `${Folder}\$R1` NORMAL
!endif
${EndIf}
ClearErrors
FindNext $R0 $R1
${Loop}
FindClose $R0
Pop $R1
Pop $R0
!macroend
!define HideAll `!insertmacro _HideAll`