Posts Tagged ‘DOS’
Nifty tools
Not long ago, I was tipped off to a handy add-on tool for Windows XP that lets you right click and open a DOS command window in the context of a folder you right-click in Windows Explorer. It’s called, simply, “Open Command Window Here” and you can download it from Microsoft’s PowerToys for Windows XP page.
Here’s a screenshot showing the context menu.
For working on batch files, testing Ant scripts, FTPing files, or just about anything that requires a command prompt this is a great shortcut. And check out the other PowerToys like the Alt-Tab replacement which gives you a thumbnail view of the application window when you press Alt-Tab. Nifty!
Now after reading Steve Carl’s Google Office Beta post and Writely and Friends post, I’ve got some more tools to play with some more! I have been working with Google Spreadsheets and find them great with only one more feature I want — I want that drag-and-fill feature that Excel has where your formulas are calculated all the way down a row. I’ve got a shared spreadsheet for doing mortgage qualification calculations. I think anyone can have access to it which is a very cool feature, I think. Google Spreadsheets had all the financial formulas I needed to re-create an Excel spreadsheet I made and since I’ve shared it with friends and family often, it seemed like the perfect candidate for sticking into Google Spreadsheets. So there you go, a practical application of a collaborative tool.
Tips for those pesky vssver.scc files
I author online Help in Dreamweaver and use Visual Source Safe (VSS) to store the HTML content files. When you use VSS, each directory contains a vssver.scc file for version tracking. That extra file always seems “pesky” to me when I cruise through the site views in Dreamweaver, so I found a way to hide them.
You can use a simple DOS command to change the vssver.scc files to hidden files, so that Dreamweaver will not show them while you’re looking at the Site view. To do so, follow these steps:
- From the Start menu, choose Run.
- Type cmd and click OK to open a DOS prompt.
- Switch directories to the top-level directory for the help system in which you want to hide the VSS files.
- At the prompt, type the following line:
-
ATTRIB +H *.scc /S
Example:
D:\Data\help_onl>ATTRIB +H *.scc /S
- Press Enter to change all the vssver.scc files to hidden files.
Some additional notes:
- The opposite of this command is ATTRIB -H *.scc /S to make all the hidden .scc files viewable.
- For even more background information on vssver.scc files, refer to this Microsoft Knowlege Base article. In a nutshell, the vssver.scc files are used to speed up GET processes, and hiding them has no affect on performance.
- To delete all the .scc files in all the directories, a similar command can be used:
-
DEL *.scc /S
MS-DOS tips for time and date stamps
We have a help rendition system internally, where all we writers do is create the source files needed to make CHM files (HHK, HHC, HHP, HTML), zip up the HTML source in a certain way with a certain file name, and submit it using a webform. Out of that rendition engine we can get CHM, JavaHelp,WinHelp, NetHelp, or our internally-created cross-platform help called Browser Help. Browser Help is the system that works with BMC Performance Manager and I’ve posted before about how to create those help systems automatically.
Since I needed to render several help systems at once, meaning I had to make multiple zip files containing the right content with the right zip file name, and I dislike tedious repetitive tasks, but somehow I like the tedium of testing and using scripts, I used DOS batch files to do the file creation and name formatting for me.
Today’s tip is how to make folders with a date and time stamp as the folder name. Our rendition engine likes its zip files with a certain naming convention. As an added bonus, this routine works before and after ten in the morning. Silly DOS, it doesn’t put a leading zero in unless you tell it to. Here’s how to tell DOS to put in the leading zero if the current time is prior to 10:00am.
REM Create sub directory called \yymmdd_hhmmss REM where yymmdd_hhmmss is a date_time stamp like 030902_134200 set hh=%time:~0,2% REM Since there is no leading zero for times before 10 am, have to put in REM a zero when this is run before 10 am. if "%time:~0,1%"==" " set hh=0%hh:~1,1% set yymmdd_hhmmss=%date:~12,2%%date:~4,2%%date:~7,2%_%hh%%time:~3,2%%time:~6,2% md h:\%yymmdd_hhmmss%
A Command-line reference A-Z that contains all the reference information for DOS command-line parameters is available on the Microsoft site.
Edited to add: Note that this script does not work for times between midnight and 1:00 am.
Subscribe to RSS
