Files and Folders Attributes

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
ineedh3lp
Junior Coder
Posts: 26
Joined: Thu Nov 04, 2010 1:11 am

Files and Folders Attributes

Post by ineedh3lp » Tue May 03, 2011 2:46 pm

Hello!

Is there a way to set the attributes of a given file/folder using macroscheduler script?

I'm referring to Archive, Hidden, System and Read only.

Thank you.

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed May 04, 2011 2:51 am

Use the DOS attrib function

Code: Select all

Let>Filename=C:\attribute_test.txt
Writeln>filename,wres,This is a test

//Set the attributes
Let>RP_WAIT=1
RunProgram>cmd /c attrib +A +R +H +S "%filename%"

ineedh3lp
Junior Coder
Posts: 26
Joined: Thu Nov 04, 2010 1:11 am

Post by ineedh3lp » Wed May 04, 2011 3:03 am

Thank you!

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts