Is there any way to set a files propeties to hidden

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
andyw
Newbie
Posts: 6
Joined: Tue Jul 01, 2003 6:08 pm

Is there any way to set a files propeties to hidden

Post by andyw » Fri Aug 27, 2004 8:36 pm

I would like so set the file propeties of an INI file to hidden.

Is there any way that this can be achieved using Macro Scheduler?
Last edited by andyw on Tue Aug 31, 2004 9:27 pm, edited 2 times in total.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Aug 27, 2004 10:45 pm

Let>RP_WAIT=1
Run Program>command.com /c attrib +h c:\Myfolder\myfile.ini
Let>RP_WAIT=0
Note that command.com is for WIN9X. Use cmd for NT/XP/2k systems.
Last edited by Bob Hansen on Mon Aug 30, 2004 12:36 am, edited 1 time in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Sun Aug 29, 2004 1:33 am

Hi Bob,

Would you be very kind enough to enlighten us on the necessity of including command.com or cmd.com in your code?

Let>RP_WINDOWMODE=1
Run Program>attrib +h c:\Myfolder\myfile.ini

I tested the above script on both Win98 and WinXP, and received no complaint from the Windows.

Thanks in advance. Have a nice weekend.

Happy scripting.

Konghong

Post by Konghong » Sun Aug 29, 2004 9:08 am

:idea: Maybe of interest for Armstrong
Why do I (or you) need AmesEdit ? As far as I know, AmesEdit is the only Windows text editor out there that's:

1. Free.
2. Allows entry of text in a language that differs from the Windows default.

Point 2 justifies some explanation and can be illustrate with an example:

I use English Windows, but often have to work with Japanese text and sometimes also Chinese text. Notepad doesn't help me here since I will often see garbled characters when I open a Japanese or Chinese text file. Other Japanese or Chinese text editors don't help because most of them are written for localized versions of Windows so their menus and dialogs come up garbled although the text display and entry may be correct. Sometimes localized text editors also don't install properly.
seen here

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Aug 30, 2004 12:46 am

armsys wrote:Would you be very kind enough to enlighten us on the necessity of including command.com or cmd.com in your code?
And once again you continue to help me out! :D

In all honesty, at this point it is just habit (looks like a bad one) that I developed years ago. At some point I found it was needed for DOS commands, but now that you ask me, it seems to me that perhaps this is only needed for internal commands? :roll:

So how many scripts have I done, and how many times have I instructed someone else to take this unnecessary step? Sorry about that folks. :oops:

Thanks again armsys
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Lumumba

Post by Lumumba » Mon Aug 30, 2004 7:08 am

it seems to me that perhaps this is only needed for internal commands
That makes sense. As several command line features are included within the command interpreter it seems not necessary to do that, but as a majority of mouse jostling users arround I'm not shure if anyone knows from scratch which are internal commands or external programs like fdisk :twisted:, xcopy, ...

IMHO, from a developer's point of view it seems to be a waste of time. If you have/want to support, it could make sense as it works anyway.

andyw
Newbie
Posts: 6
Joined: Tue Jul 01, 2003 6:08 pm

Thank you - It worked nicely

Post by andyw » Tue Aug 31, 2004 9:26 pm

I eventually used:

Let>RP_WINDOWMODE=1
Run Program>attrib +h c:\Myfolder\myfile.ini


Thanks for your assistance

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Wed Sep 01, 2004 2:42 pm

Hi andyw,

Glad you have solved your problem.

If you desire to quicken the process or keep it clandestine, you may assign 0 (zero) to RP_WINDOWMODE. That is,

Let>RP_WINDOWMODE=0
Run>attrib +h c:\Myfolder\myfile.ini

Happy scripting.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Sep 01, 2004 5:06 pm

And I always use RP_WAIT=1 with Run Program> to make sure the script does not continue until the called program has been completed. Not always necessary, but can eliminate some confusing results.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Thu Sep 02, 2004 7:37 am

Hi Bob,

It's always my pleasure to exchnage views with you. You taught us so many Macro Scheduler coding techniques. The honor and credit is yours.

Again, I beg for a difference due to my actual experience. Sometimes, I run several MS scripts concurrently. If one contains a Let>RP_WAIT=1 statement, all other scripts are stopped as a result.

Again, you're absolutely right. During initial stage of development, I definitely rely on RP_WAIT=1 to ensure the external excutable running successfully.

Happy scripting.
Last edited by armsys on Thu Sep 02, 2004 4:00 pm, edited 1 time in total.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Sep 02, 2004 3:50 pm

Hi armsys

I also enjoy our interchange of ideas. Very rarely do we disagree, but only get stronger with more tools. And this time, again, I do not disagree with you. I should have written "almost always" vs. "always".

Use of RP_WAIT depends on the actual tasks being done. I agree with you that it is not always needed. It obviously can slow down the process.

Since duration of routines is rarely a problem for me, I usually take the conservative route, adding extra protection as a shield against problems. So if I do have a problem, I can already eliminate a race condition resulting from a slow RunProgram> action. My thick scar tissue from past problems has developed my own personal scripting techniques.

I just wanted to make a reminder that it is available. Some of these important variables get lost in the commands, they are not on the Help Index tab. If you don't know to search for them, you may miss them completely.

"When the only tool you have is a hammer, then every tool looks like a nail." Thanks to you and others, my toolbox is very heavy.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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