Download TSCMD.ZIP from some miscellaneous scripts and freeware.
The TSCMDINF.TXT file contains:
Sun 30-October-2005 TSCMDINF.TXT About TSCMD in General (All rights reserved) =================================== ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Please do not distribute any part of this package separately. ³ ³ If you come upon such a distribution or a reproduction on an ³ ³ unauthorized WWW page or similar, please alert the author. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ For more information please see the Introduction section at the beginning of 1CMDFAQ.TXT. Timo Salmi (email: [email protected] WWW: http://www.uwasa.fi/~ts/) Professor of Accounting and Business Finance Faculty of Business Studies University of Vaasa P.O. BOX 700, FIN-65101 Vaasa, Finland TSCMD32.ZIP Script file collection, T.Salmi Filename Comment -------- -------------------------------- 1CMDFAQ.TXT NT/w2k/XP script tricks and tips CHOOSE.EXE Ask questions in script files COLORMAP.CMD Display ECHOC.EXE color map DATE2NUM.EXE Date into a Julian date number DELE.CMD Recoverable command-line delete ECHOC.EXE Echo in colors EDATE.CMD Some alternative date formats FILEAGE.CMD Find out how old a file is FILEINFO.CMD CMD shell for FILEINFO.VBS FILEINFO.VBS FileInfo Visual Basic Script FILE_ID.DIZ Brief characterization of TSCMD FULLNAME.CMD Display the full name of a file MAILDATE.CMD Build a message's "From" header M_TSCMD.CMD Makefile that built this package NAMEDOWN.CMD Covert a filename to lower case NAMEUP.CMD Covert a filename to upper case NUM2DATE.EXE A Julian date number into a date RECENT.CMD CMD shell for RECENT.VBS RECENT.VBS Search folders for recent files TSCMDIDX.TXT The questions index separately TSCMDINF.TXT Document (a readme) for TSCMD TSCMDNWS.TXT News about the TSCMD package TSPROG.TXT List of programs from Timo Salmi WAKEUP.CMD A reminder desktop alarm clock WHEREIS.CMD Find a file anywhere on a drive XPMOVE.CMD CMD shell for XPMOVE.VBS XPMOVE.VBS Move newer files between folders ---- ------ ------ ----- 0027 The 1CMDFAQ.TXT "NT/2000/XP script tricks and tips" is a text file in a mailbox format. Thus you can also read it indexed with any suitable mail program. For example, I use PC-Pine for that purpose on my PC. The latest version of TSCMD is best available without the version number as ftp://garbo.uwasa.fi/pc/link/tscmd.zip to avoid potential broken links. The files with and without the version number are identical. CHOOSE.EXE (Ver. 1.1) Ask questions in script files ===================== Usage: CHOOSE \[/c\[:\]keys\] \[/?|/h\] \[/n\] \[/s\] \[/t\[:\]c,nn\] \[/x\] \[text\] the prompt keys ÄÙ ³ ³ ³ ³ ³ ³ ³ Help ÄÙ ³ ³ ³ ³ ³ ³ No default prompt (only user text) ÄÙ ³ ³ ³ ³ ³ apply case Sensitivity ÄÙ ³ ³ ³ ³ default key after timeout (must be among keys) ÄÙ ³ ³ ³ Timeout in seconds ÄÙ ³ ³ Output @set choose_=returnCode ÄÙ ³ user's text prompt ÄÙ MS-DOS 6.0 finally included a CHOICE command for making user choices in batches. CHOOSE simulates CHOICE for the earlier MS-DOS versions reasonably accurately. The idea is that if you have obtained a batch that uses CHOICE, but you don't have MS-DOS 6.0, you can still utilize the batch. The syntax is naturally based on MicroSoft's, except for the addition of the help switch. The actual CHOOSE program is a Turbo Pascal 7.01 program based the author's own, earlier ASK program for making choices in batches. (Contrary to CHOICE, CHOOSE handles also the /t:c,0 timeout correctly.) This program has gained a new lease of life in the NT/2000/XP/... series, since the CHOICE command no longer is a part of the command line commands set. For more see the item #14 in 1CMDFAQ.TXT (Help! My old batch files won't work since there is no choice). COLORMAP.CMD Display ECHOC.EXE color map ============ For more information and alternatives see item #51 "How can I echo lines in different colors in NT scripts?" DATE2NUM.EXE (Ver 1.0a) Date into a Julian date number ======================= Usage: DATE2NUM DD MM YYYY \[/set\] \[/?\] include @set ÄÙ ³ Help ÄÙ Calculates the Chronological Julian Date Number for a local Gregorian date. If no date is given, uses today's date. For examples see e.g. items #6 (How does one get yesterday's date?), #13 (How do I get the current day of the week?) and #31 (How many days ago was 31.12.2002? What date was it 100 days ago?) Note: No extensive validity checking of the date entered is performed by the program. Save for checking for trivial errors entering a valid date is up to the user. DELE.CMD Recoverable command-line delete ======== Usage: DELE \[FileNameToBeMovedToTheTargetTrashFolder\] If one deletes files using the DEL command-line command, one cannot retrieve them. DELE.CMD is an intermediate step, emulating the Recycle Bin to an extent. Instead of actually deleting the selected files DELE moves them to a trash folder. ECHOC.EXE (Ver 1.0) Echo in colors =================== Usage: ECHOC bgColor fgColor The text \[0..15\] \[0..15\] Example of usage in an NT CMD.EXE script: @echo off & setlocal enableextensions echoc 0 15 Hello world (On black bright white) echo. echoc 4 14 Hello again (On red bright yellow) echo. echoc 0 13 Done! (On black bright magenta) echo. endlocal & goto :EOF Limitations: Echoed words will be separated by exactly one space. But you can use just "ECHOC bg fg" or ASCII 255 for multiple spaces. See item #51 (How can I echo lines in different colors in NT scripts?) and try COLORMAP.CMD for more examples. EDATE.CMD Some alternative date formats ========= Outputs e.g. 650903 2005.09.03 Sat Sep 03 09:26:02 2005 Sat, 03 Sep 2005 09:26:02 +0200 (EET) Sat, 03 Sep 2005 09:26:02 +0300 (EEST) Sat Sep 03 09:26:02 2005 Week 35 Day 246 Saturday 03 September 2005 09:26:02 Sat 03-Sep-2005 09:26 Sat 03-Sep-2005 09:26:02 Sat 3-Sep-2005 09:26:02 La 03.09.2005 9:26:02 lauantai 03. syyskuuta 2005 9:26:02 lauantaina 03. syyskuuta 2005 9:26:02 Useful for example for copying the date from the output to the clipboard for subsequent pasting. FILEAGE.CMD Find out how old a file is =========== Usage: FILEAGE \[FileName\] FILEINFO.CMD CMD shell for FILEINFO.VBS ============ Usage: FILEINFO.CMD FileName No wildcards Long file names should be enclosed in parentheses FILEINFO.VBS FileInfo Visual Basic Script ============ Gives information about a file. E.g. F:\INF\TSCMD.DIZ Size: 152 Attributes: Created: 14.11.2003 04:27:11 Last modified: 16.11.2003 09:28:59 Last accessed: 26.02.2004 07:16:06 FULLNAME.CMD Display the full name of a file ============ An important warning: Do not associate with "File Folder", "Folder" or "Drive" types! The intended main usage of this script is the following. In My Computer Tools File Types (choose one from the list) Advanced New one can associate file types with additional programs and scripts. Associate the current script and it will open a temporary dosbox to display the path to the target file from your desktop. Some customization of the pause logic at the end of the script may be required. MAILDATE.CMD Build a message's topmost "From" header ============ This script forms the beginning "From" line of an email message header. It is based on the "From: " and the "Date: " header fields. The information can be needed since sometimes the beginning "From" header is broken or missing altogether. The script is not perfect, but it should be able to handle the most common situations. The SED.EXE third party program is needed to use this script. The script can distinguish between the two major "From: " formats Timo Salmi
[email protected] (Timo Salmi) M_TSCMD.CMD A makefile to build this package =========== Included for a code demonstration, only. Only needed by the author. NAMEDOWN.CMD Covert a filename to lower case ============ Usage: NAMEDOWN \[FileName.Ext\] No wildcards For wildcards use e.g. for %f in (*.JPG) do call namedown %f Long file names should be enclosed in parentheses NAMEUP.CMD Covert a filename to upper case ========== Opposite of the NAMEDOWN.CMD Usage: NAMEUP \[FileName.Ext\] No wildcards For wildcards use e.g. for %f in (*.txt) do call nameup %f NUM2DATE.EXE (Ver 1.0a) A Julian date number into a date ======================= The "inverse" of DATE2NUM.EXE Usage: NUM2DATE JulianDateNumber \[/set\] \[/?\] include @set ÄÙ ³ Help ÄÙ Returns the local Gregorian date for a Chronological Julian Date Number. "Chronological Julian Date Number is a daycount starting at Julian Calendar BC 4713-01-01 00:00:00 local time = CJD 0.0." (From John Stockton) With /set returns: @set dd_=day @set ddpad_=day zero-padded @set mm_=month @set mmpad_=month zero-padded @set yyyy_=year with four digits else returns (zero-padded) YYYYMMDD With no parameters, returns this help. With only /set given returns the current date variables. RECENT.CMD CMD shell for RECENT.VBS ========== Before using you will wish to customize the folder paths (after the label "Call the actual VBS script" in the RECENT.CMD to correspond to yours. Be patient. The method is not fast. Usage: RECENT \[DaysBack\] \[FromTime\] \[Exact\] Examples: Find file made today RECENT Find files made after 15:00:00 yesterday and after 15:00:00 today RECENT 1 150000 Find files made two days ago after 07:50:00, but not yesterday or today RECENT 2 075000 Exact Also see below. RECENT.VBS Search folders for recent files ========== Examples of usage: cscript //nologo recent.vbs C:\_F 0 150000 will find files made or modified today after 15:00:00 in the C:\_F folder and all its subfolders. cscript //nologo recent.vbs "C:\Program Files" 1 000000 will find files made yesterday AND today. Note the need of the quotation marks, since there is a space in the start folder name. cscript //nologo recent.vbs C:\_F 1 000000 Exact will find files made yesterday only (since midnight) Hint cscript //nologo recent.vbs C:\_F 1 150000 will find files made yesterday AND today after 15:00:00. That goes for both(!) the days. If you wish to find files made after yesterday 15:00:00 inclusive this morning then divide the search into two parts: cscript //nologo recent.vbs C:\_F 1 150000 Exact cscript //nologo recent.vbs C:\_F 0 000000 WAKEUP.CMD A trivial reminder desktop alarm clock ========== Usage: c:\_F\XTOOLS\WAKEUP.CMD \[HH:MM\] \["Message in quotes"\] Only cursory syntax error checking c:\_F\XTOOLS\WAKEUP.CMD utilizes the AT command scheduling For information on AT apply AT /? WHEREIS.CMD Find a file anywhere on a drive =========== Usage: WHEREIS \[FileMask\] \[/a\] \[/m\] \[/s\] /a show All files, including hidden /m pipe to More /s Sort by date E.g. WHEREIS *.XLS /s /m Alternative usage: WHEREIS /? for this brief help. XPMOVE.CMD CMD shell for XPMOVE.VBS ========== Warning: Moving files can always involve some dangers. All the risks are carried by the user alone. Moves files from FromFolder to ToFolder if an older file with the same name is found in the ToFolder Before usage, customize the paths in the cscript call as befits you. XPMOVE.VBS Move newer files between folders ========== Warning: Moving files can always involve some dangers. All the risks are carried by the user alone. Usage: cscript //nologo xpmove.vbs FromFolder ToFolder \[/sub:no\] If /sub:no is not present, also ToFolder subfolders are traversed Alternatively use the XPMOVE.CMD shell Skips system and hidden files! Irrespective of whether the attribute is at source or destination. Skips (access denied) if the target file is readonly. However, if the source file is readonly, and the target file is not, the file will be moved. The moved file retains its readonly attribute.