Main Menu

Contact Us

Login




 


 Log in Problems?
 New User? Sign Up!

How do you execute DOS commands from a formula?

(319 total words in this text)
(1112 Reads)  Printer-friendly page

How do you execute DOS commands from a formula?

Use the macro (note the use of the /C in the DOS command):

@Command([Execute]; "C:\\COMMAND.COM"; "/C DEL C:\\TEST.TXT")

ATRIB SYNTAX

Microsoft Windows 95, 98, and ME syntax

Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:][path]filename] [/S]

+ Sets an attribute.

- Clears an attribute.

R Read-only file attribute.

A Archive file attribute.

S System file attribute.

H Hidden file attribute.

/S Processes files in all directories in the specified path.



Microsoft Windows 2000 and Windows XP syntax

Displays or changes file attributes.



ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [[drive:] [path] filename] [/S [/D]]

+ Sets an attribute.

- Clears an attribute.

R Read-only file attribute.

A Archive file attribute.

S System file attribute.

H Hidden file attribute.

/S Processes files in all directories in the specified path.

/D Process folders as well.



Microsoft Windows 2000 and Windows XP recovery console syntax

Note: The below options are the available options in the Windows recovery console.

Changes attributes on one file or directory.

ATTRIB -R | +R | -S | +S | -H | +H | -C | +C filename

+ Sets an attribute.

- Clears an attribute.

R Read-only file attribute.

S System file attribute.

H Hidden file attribute.

C Compressed file attribute.

EXAMPLES

attrib +r autoexec.bat - This would make the autoexec.bat so it cannot be modified until the read only attribute is taken off.

attrib +h config.sys - This would make the config.sys hidden so to the average user this file would not be existent however if the attrib command it typed alone "attrib" this will show any hidden files.

attrib -h config.sys - This command will do the apposite of the above command. Instead of hiding the file it will unhide the file if hidden.

 
Web Hosting Forums
Free hosting hardware and software support forums
Web Hosting Directories and cheap hosting
web hosting directory with top 10 web hosts
Cheap Web hosting
© 2010 Hashdot.com