- May 24, 2010
Simple task: I want to display a dialog box that shows the existing name of a file along with an input field containing a proposed new name for that file (derived from the contents of said file; my goal is to make what the file contains obvious given the name of the file), and, very surprisingly to me, I absolutely can not get that to work the way that I want it to. There are two problems: 1. The "proposed" new file name is longer than the length of the input field in the dialog box despite the fact that the "length" of said input field has been set to a relatively huge value of 100 (and I could find no length that caused it to work the way I want it to), and 2. Entering any character into the input field in the dialog box causes the existing "proposed" new file name to disappear into the ether, despite the fact that the "/E" (edit?) flag has been specified, meaning that the end-user of said batch file can not "modify" the "proposed" new file name in any way to get the actual "desired" new file name. To be more specific, the code:Displays a dialog box whose input field contains the stringand, again, the string can not be "edited" in any way by the end user, it can only be totally replaced. Am I just plain trying to do something that can not be done?
Set ExistingName="%@UnQuote[%1]" Set ProposedNewName=This will be a quite long date-qualified name.V2009-01-01 To 2011-19-31.txt QueryBox /Cue="%ProposedNewName" /E /L100 "Rename File " Enter New name for file "%ExistingName": %%NewName
This will be a quite long date-qualified name.V2009-01-0