Sign in to follow this  
Followers 0
Frontalabotomy

Changing File Attributes.....

4 posts in this topic

Gentlemen, I once again turn to the gurus of guru.......

I am in bind, as I didn't realize an issue I created by placing a script to run from CD.... The file is readonly on the CD (i guess because you cant change it there....as it was not read only before burning it to cd...)and that attribute seems to be carrying over when the file is copied to the Program folder....

Arrrgh,, any ideas. Can %COMSPEC% help me with this or does the file copy command have attribute flags????

Thanks in advance..

CW

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Yeah, you can do:

Run, %comspec% /c attrib -R "%ProgramFiles%\\filename.txt"

Edited by cmallett

Share this post


Link to post
Share on other sites

OK, I cannot get it to take the variable, nor a key send....

I can get it to work when I enumerate the path manually, but not with "" around the %notesdata%\\bookmark.nsf

weird.... or am I doing something wrong..

here is my single line of code...

RunWait, %comspec% /c attrib -r c:\\lotus\\notes\\data\\bookmark.nsf

This one works, as I can physically see the change..

but.... this one willnot....

RunWait, %comspec% /c attrib -r "%notesdata%bookmark.nsf"

or

RunWait, %comspec% /c attrib -r "%notesdata%\\bookmark.nsf"

or

what an ID10T!! Sorry, forgot the notesdata... it's on a different script not running at this time, there fore cannot get the variable.... STUPID ME>>> SORRY FOR WASTING YOUR TIME, I will edit the code to get this variable and repost my retarded answer....

You are probably right on.......

thanks again

Share this post


Link to post
Share on other sites

I might have been wrong about the quotes placement. You might have to experiment with that, and the behavior might vary depending on your OS type.

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0