Create folders then set description

Is there a way to create a set of folders, like A,B,C,D then set the descriptions for those folders all at once? I tried

CreateFolder NAME A
SetAttr DESCRIPTION Description of A
CreateFolder NAME B
SetAttr DESCRIPTION Description of B

something like that??

You can create multiple folders at once easily enough, to then set their descriptions I'd probably go about it something like this:

CreateFolder "Name A" "Name B" "Name C" "Name D" Select NONE Select PATTERN="Name A" Select PATTERN="Name B" Select PATTERN="Name C" Select PATTERN="Name D" SetAttr DESCRIPTION

No need to select the files, you can pass a filename, or filenames, to the SetAttr command.

Right you are Leo, I'd forgotten about that. :blush: This would shorten the button commands down to something like:

CreateFolder "Name A" "Name B" "Name C" "Name D" SetAttr DESCRIPTION FILE "Name A" "Name B" "Name C" "Name D"

Nice! thank you very much

i must be doing something wrong. I tried the code

CreateFolder "Name A" "Name B" "Name C" "Name D" SetAttr DESCRIPTION FILE "Name A" "Name B" "Name C" "Name D" however a dialogue opened asking for the name of each folder. i wanted to set the description without interacting. Is there a way to do that?

There is. It's explained in the manual section on the SetAttr command. Have you read it and are having problems understanding it or did you just not think to look in the manual? :slight_smile:

It is simply a matter of not being able to understand the manual, i suppose. Two PhDs just arent enough...but, yes, I did read the manual section on the SetAttr raw command as well as the descriptions of both the DESCRIPTION and the FILE arguments.

This works:

CreateFolder "Name A" "Name B" "Name C" "Name D" SetAttr FILE "Name A" DESCRIPTION "Desc A" SetAttr FILE "Name B" DESCRIPTION "Desc B" SetAttr FILE "Name C" DESCRIPTION "Desc C" SetAttr FILE "Name D" DESCRIPTION "Desc D"
This does not:

CreateFolder "Name A" "Name B" "Name C" "Name D" SetAttr DESCRIPTION FILE "Name A" "Name B" "Name C" "Name D"

Okay, last question on this topic. I want to add descriptions to to sub folders as well. I have tried this

CreateFolder A B C D A\1 A\2 B\1 B\2 C\1 C\2 SetAttr FILE A DESCRIPTION "Desc of A" SetAttr FILE B DESCRIPTION "Desc of B" SetAttr FILE C DESCRIPTION "Desc of C" SetAttr FILE D DESCRIPTION "Desc of D" SetAttr FILE A\1 DESCRIPTION "Desc of A\1" SetAttr FILE A\2 DESCRIPTION "Desc of A\2" SetAttr FILE B\1 DESCRIPTION "Desc of B\1" SetAttr FILE B\2 DESCRIPTION "Desc of B\2" SetAttr FILE C\1 DESCRIPTION "Desc of C\1" SetAttr FILE C\2 DESCRIPTION "Desc of C\2" but it doesn't work like i would expect it to. can i specify subfolders like that using the FILE argument?

[quote="CrimeDoctor"]This does not:

CreateFolder "Name A" "Name B" "Name C" "Name D" SetAttr DESCRIPTION FILE "Name A" "Name B" "Name C" "Name D" [/quote]

You're not specifying what the description is anywhere in that command line so it has to ask you for it when you run the command.

Note that in the command that does work you've put something after the DESCRIPTION argument to specify what the description is, but in the command that doesn't you haven't.

You may have to use the full path, not just the relative path. You can build it using things like "{sourcepath}\1" or similar (depending on exactly what you want).