DirCreatePyTmp
DirCreatePyTmp helps a desktop user in creating a list of valid sub-directories names using text segments from documents. It avoids the requirement of editing manually directory names in order to be compliant with the operating system and user policy.
This metascript and related script demonstrate the use of a temporary file (and the DTMP parameter) that will contain the list of untagged drops. This file is read by the script; it will create a directory name for each line and outputs it into the system output.
Description
Overview
DirCreatePyTmp accepts untagged text drops. Upon activation, It will modify each dropped text into related valid directory name(s). It will put them into the system clipboard (one name per line).
A dropped text is modified as follows:
- Leading and trailing whitespace characters (space, tab, linefeed, carriage return) are removed
- The remaining whitespace characters are replaced by the hyphen character
- The following characters are replaced by an underscore character: $%&',?!><\/*{}()[]"
Variants
- Default:
The only variant.
Tagged Drops
There is no tagged drop.
Untagged Drops
Each text drop will be modified, as necessary, for generating a valid directory name.
Clipboard Use
The clipboard is not used as input for any variant. However, the clipboard will contains the modified text of the drops; one per line..
Possible Metascript-Related Messages
- ERR: Tmp file Rd err
The script cannot read the temporary file; this should not occur.
Other Considerations
An explicit Clear List command is required if an error is encountered. Otherwise, the list of drops is automatically cleared upon a successful operation.
Script Effects
None.
Requirements
- Executable:
pythonw
- Script file(s):
tutorial\DirCreatePyTmp.py
- IO access:
the tmp\DirCreatePyTmp.tmp file have been created or updated.
Side Effects:
- Clipboard Usage:
Yes, as output
- No other side effect.
Instructions
Creating sub-directory names
Here are the detailed instructions for creating a list of valid sub-directory names into your system clipboard.
- Make sure that D&Do pink drop target area displays: DO
- Using any document browser that accepts text drag (ex. the Internet Explorer, the MS Word, HTML Help viewer, many dialog messages, etc)
- For each name to create:
- Highlight a text fragment that you want to use as a sub-directory name
- Release the mouse; the text should be highlighted
- Click on the highlighted text, drag it to the D&Do drop target
- Click the drop target area
- You should observe that:
- The drop target should display: DO
- The status message display: INF: Exit = 0
- You can paste the system clipboard content into one of your applications
This is it.
Source
Please, add authors and owners for each version of the metascript
Owner(s):
- Company:
Big Feet Software
- License:
Freeware; you may use and modify this metascript and related script files. You cannot claim ownership of their original version.
Author(s):
- Name:
Marcel St-Amant
- Country:
CANADA
- Release Date:
2003-10-13
- Version:
1.0