Sponsored Content
Top Forums Shell Programming and Scripting Rename folder based on containing XML file Post 302377123 by CoolCow on Thursday 3rd of December 2009 07:30:56 AM
Old 12-03-2009
Thanks to both, you pointed me in the right direction.

Got it working now.

btw, is it possible to show some kind of message box from the shell to inform when something went wrong without using the dialog package?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rename File Based on Created Date

I am trying to rename files based on the created/born date of the file. I Have a total of 4000 files that i am trying to do this with and would like it to be log_yyyymmddhh.gz right now the files are maillog.???.gz. Can anyone point me in the right direction of how to get this done via scipt? ... (4 Replies)
Discussion started by: Paulb
4 Replies

2. UNIX for Advanced & Expert Users

Unix Command to rename a file in a zipped folder

Hi, I am into automation work. Is there any UNIX command to rename a file in a zipped folder, without unzipping it..??? Thanks in advance.. (1 Reply)
Discussion started by: Victoria.Sam
1 Replies

3. Shell Programming and Scripting

Rename a file based on a specific separator

Hello, I am new to shell I have a folder which contains a list of files, all the files contain the separator : I need to replace this character for all the filenames (by batch) ex: hello:world should become hello-world please help Thanks (3 Replies)
Discussion started by: sikilaklak
3 Replies

4. Shell Programming and Scripting

Rename files with tag in a .xml file

Hi Guys! 1st of all, i am sorry for my bad english! I got a Sat-Receiver and i recorded some Stuff for my Children, now the Harddrive is full and i want to convert and rename it, that i can put it on DVDs But I've got a big Problem! I want to rename the files , with a tag in a xml file... (4 Replies)
Discussion started by: crusty
4 Replies

5. Shell Programming and Scripting

Need help in writitng a script to rename file name and copy to other folder

Hi All, My requirement is as follows: A file (say abc) will be having list of the .txt file names. I need to read this abc file line by line and rename the .txt file names inside it and move them to other folder/path. Eg: abc ------- file1.txt file2.txt file3.txt Output (should... (1 Reply)
Discussion started by: pavan.yadalla
1 Replies

6. Shell Programming and Scripting

Remove or rename based on contents of file

I am trying to use the two files shown below to either remove or rename contents in one of those files. If in file1.txt $5 matches $5 of file2.txt and the value in $1 of file1.txt is not "No Match" then that value is substituted for all values in $5 and $1 of file2.txt. If however in $1 ... (5 Replies)
Discussion started by: cmccabe
5 Replies

7. Shell Programming and Scripting

Rename files based on name in text file

Hello, I have a text file "file.list" with the contents below. file1 filename1 file2 filename2 file3 filename3 file1, file2 and file3 are files existing in the same directory as the text file file.list. I want to rename file1 to filename1, file2 to filename2, as show in the text... (1 Reply)
Discussion started by: james2009
1 Replies

8. Shell Programming and Scripting

Split xml file into multiple xml based on letterID

Hi All, We need to split a large xml into multiple valid xml with same header(2lines) and footer(last line) for N number of letterId. In the example below we have first 2 lines as header and last line as footer.(They need to be in each split xml file) Header: <?xml version="1.0"... (5 Replies)
Discussion started by: vx04
5 Replies

9. UNIX for Beginners Questions & Answers

Rename files based on simple text file

Hello! New here although not completely new to Unix. I wonder how I could rename files based on the data found in a simple textfile. It goes like this: I have 4 files 1 ldfgkkfjslkdfjsldkfjsf.wav 2 nndsdflksdjf.wav 3 sdflksjdf jjsdflsdfl.wav 4 dkadsdddd.wav Textfile.txt looks like... (14 Replies)
Discussion started by: Oortone
14 Replies

10. Shell Programming and Scripting

Bash to copy file 3 times and rename based on another file

In the below bash I am trying to copy the only text file (always only one) in /home/cmccabe/Desktop/list/QC/metrics.txt and rename each of the 3 text files according to /home/cmccabe/Desktop/test/list.txt using lines 3, 4 ,5. This format (that is list.txt) is always 5 lines. Thank you :). ... (12 Replies)
Discussion started by: cmccabe
12 Replies
iwidgets::dialogshell(1)					  [incr Widgets]					  iwidgets::dialogshell(1)

__________________________________________________________________________________________________________________________________________________

NAME
iwidgets::dialogshell - Create and manipulate a dialog shell widget SYNOPSIS
iwidgets::dialogshell pathName ?options? INHERITANCE
itk::Toplevel <- iwidgets::Shell <- iwidgets::Dialogshell STANDARD OPTIONS
background cursor foreground See the "options" manual entry for details on the standard options. INHERITED OPTIONS
height master modality width See the "shell" manual entry for details on the above inherited options. title See the "Toplevel" manual entry for details on the above inherited options. WIDGET-SPECIFIC OPTIONS Name: buttonBoxPadX Class: Pad Command-Line Switch: -buttonboxpadx Specifies a non-negative padding distance to leave between the button group and the outer edge of the button box in the x direction. The value may be given in any of the forms accpetable to Tk_GetPixels. The default is 5 pixels. Name: buttonBoxPadY Class: Pad Command-Line Switch: -buttonboxpady Specifies a non-negative padding distance to leave between the button group and the outer edge of the button box in the y direction. The value may be given in any of the forms accpetable to Tk_GetPixels. The default is 5 pixels. Name: buttonBoxPos Class: Position Command-Line Switch: -buttonboxpos Attaches buttons to the given side of the dialog: n, s, e or w. The default is s. Name: padX Class: Pad Command-Line Switch: -padx Specifies a padding distance for the childsite in the X-direction in any of the forms acceptable to Tk_GetPixels. The default is 10. Name: padY Class: Pad Command-Line Switch: -pady Specifies a padding distance for the childsite in the Y-direction in any of the forms acceptable to Tk_GetPixels. The default is 10. Name: separator Class: Separator Command-Line Switch: -separator Specifies whether a line is drawn to separate the buttons from the dialog box contents in any of the forms acceptable to Tcl_Get- Boolean. The default is true. Name: thickness Class: Thickness Command-Line Switch: -thickness Specifies the thickness of the separator in any of the forms acceptable to Tk_GetPixels. The default is 3 pixels. __________________________________________________________________________________________________________________________________________________ DESCRIPTION
The iwidgets::dialogshell command creates a dialog shell which is a top level widget composed of a button box, separator, and child site area. The class also has methods to control button construction. METHODS
The iwidgets::dialogshell command create a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form: pathName option ?arg arg ...? Option and the args determine the exact behavior of the command. The following commands are possible for dialogshell widgets: INHERITED METHODS
activate center deactivate See the "shell" manual entry for details on the above inherited methods. ASSOCIATED METHODS
add buttonconfigure defaultdelete hide index insert invoke show See the "buttonbox" manual entry for details on the associated methods. WIDGET-SPECIFIC METHODS pathName cget option Returns the current value of the configuration option given by option. Option may have any of the values accepted by the iwid- gets::dialogshell command. pathName childsite Returns the pathname of the child site widget. pathName configure ?option? ?value option value ...? Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iwidgets::dialogshell command. COMPONENTS
Name: dschildsite Class: frame The dschildsite component is the user child site for the dialog shell. See the "frame" widget manual entry for details on the dschildsite component item. Name: separator Class: frame The separator component devides the area between the user child site and the button box. See the "frame" widget manual entry for details on the separator component item. Name: bbox Class: ButtonBox The bbox component is the button box containing the buttons for the dialog shell. See the "ButtonBox" widget manual entry for details on the bbox component item. EXAMPLE
package require Iwidgets 4.0 iwidgets::dialogshell .ds -modality none .ds add OK -text "OK" .ds add Cancel -text "Cancel" .ds default OK .ds activate AUTHOR
Mark L. Ulferts KEYWORDS
dialogshell, dialog, shell, widget Tk iwidgets::dialogshell(1)
All times are GMT -4. The time now is 10:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy