Scripting files




















A script file is a text file that contains a sequence of debugger commands. There are a variety of ways for the debugger to load a script file and execute it. A script file can contain commands to be executed sequentially or can use a more complex flow of execution. The debugger automatically executes this file when the debugger starts.

To use a different file for the startup script file, specify the path and file name by using the -cf command-line option or by using the IniFile entry in the Tools. KD and CDB only; when each session starts Create a script file and specify its path and file name by using the -cfr command-line option.

The debugger automatically executes this script file when the debugger starts and every time that the target is restarted. When you use these commands, the debugger opens the specified script file, replaces all carriage returns with semicolons, and executes the resulting text as a single command block.

Echo "System folder. Echo "Folder. Echo "Archive bit set. Echo "Compressed folder. DateCreated Wscript. DateLastAccessed Wscript. DateLastModified Wscript. Drive Wscript. IsRootFolder Wscript. Name Wscript. ParentFolder Wscript. Path Wscript. ShortName Wscript. ShortPath Wscript. Size Wscript. CreationDate Wscript. Echo objFile. Echo "Archive bit set. Echo "Link or shortcut. Echo "Compressed file. DateCreated Wscript.

DateLastAccessed Wscript. DateLastModified Wscript. Drive Wscript. Name Wscript. ParentFolder Wscript. Path Wscript. ShortName Wscript. ShortPath Wscript. Size Wscript. Type Enumerating a Specific Set of Files Returns a list of all the files larger than 1,, bytes. Enumerating a Specific Set of Files Modifying File Attributes Demonstration script that checks to see if a file is read-only and, if it is not, marks it as read-only.

Best when run under Cscript. NextEvent Wscript. Echo objLatestEvent. FileSize Wscript. Extension objFile. Copy strCopy objFile.



0コメント

  • 1000 / 1000