Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Renaming a file using wild characters Post 302396814 by master346 on Friday 19th of February 2010 11:01:21 AM
Old 02-19-2010
The command as I mentioned isn't working for me. I m not sure if I am using the right syntax.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Renaming a file name

I have an audit log that is produced each day from a production printer. It names the file using todays date, but it removes the leading zero's. For example: todays date 060104 names the file 6104.txt. I ftp this file onto a Sun box and pull stats off of it. To keep some consistency to what I am... (2 Replies)
Discussion started by: dbrundrett
2 Replies

2. Shell Programming and Scripting

renaming with wild chars

Hi, Is it possible to rename with wild charaters as destination name ex I wanna rename xxx_1010_zzz_0.txt to aaa_1010_zzz_1.txt, yyy_1000_ppp_1.txt to bbb_1000_ppp.0.txt I wanna reatin some of the patterns in the filename, rest I wanna rename. like mv... (2 Replies)
Discussion started by: braindrain
2 Replies

3. Shell Programming and Scripting

file renaming

How can I rename files named like these iq - 000001 - 2008.07.31 - 14.49.47 - location1.bin iq - 000001 - 2008.07.31 - 14.49.47 - location12.bin iq - 000008 - 2008.07.31 - 14.52.01 - location500.bin to iq_2008.07.31_14.49.47_location1.bin iq_2008.07.31_14.49.47_location12.bin... (7 Replies)
Discussion started by: larne
7 Replies

4. Shell Programming and Scripting

Find Existence of File with wild card using Csh

Hi All, I would like to find out the existence of files with wild card using CSH. I have used the below code but does not seem to work. Can any expert give me some advice ? set nonomatch set pattern = "_xxx" set filetype = ( *$pattern* ) if ( -e $filetype) then echo... (2 Replies)
Discussion started by: Raynon
2 Replies

5. Shell Programming and Scripting

Renaming a file use another file as a sequence calling a shl

have this shl that will FTP a file from the a directory in windows to UNIX, It get the name of the file stored in this variable $UpLoadFileName then put in the local directory LocalDir="${MPATH}/xxxxx/dat_files" that part seems to be working, but then I need to take that file and rename, I am using... (3 Replies)
Discussion started by: rechever
3 Replies

6. Shell Programming and Scripting

File renaming from list of names contained in another file

I have to rename a large number of files so that the name of each file corresponds to a code number that is given side by side in a list (textfile). The list contains in column A the filename of the actual files to be renamed and in column B the name (a client code, 9 digits) that has to be... (7 Replies)
Discussion started by: netfreighter
7 Replies

7. UNIX for Dummies Questions & Answers

Need help with Renaming a file

I have a file named as Pro_PatAct_MMDDYYYY.csv. I need to renmae it to this Pro_PatAct.csv without the date timestamp. Can someone help me to achieve this using a regular expn. (3 Replies)
Discussion started by: imran_affu
3 Replies

8. Shell Programming and Scripting

Renaming file and check for the renamed file existence

Hi Am trying to move a file from one name to another When I do "ls" to check for the moved filename I can see the file but when I try the same with a script am unable.. I think am doing some pretty silly error.. please help.. toMove=`ls | grep -E "partition.+"` mv $toMove partition._org... (7 Replies)
Discussion started by: Priya Amaresh
7 Replies

9. UNIX for Dummies Questions & Answers

Renaming Multiple Files by removing characters

Hi I would like to rename Multiple files in a Unix Directory using Ksh Command. Eg ATT8-2011-10-01 00:00:00-MSA-IMM-SINGLE_AND_FAMILY_COVERAGE-DED-$2000-X114817.PDF needs to be renamed as ATT8-2011-10-01-MSA-IMM-SINGLE_AND_FAMILY_COVERAGE-DED-$2000-X114817.PDF Basically the time... (2 Replies)
Discussion started by: pchegoor
2 Replies

10. Shell Programming and Scripting

PERL - getting last file using wild cards

Hi experts, I am new to perl. I am trying to get the last file from set of files. Using the below code; but getting error pls help Files: -rw-r--r-- 1 abc abc 12584 Mar 18 16:22 /abc/def/ghi/xyz.HOSTNAME.2016.03.18.16.21.69709-6 -rw-r--r-- 1 abc abc 12623 Mar 18 16:25... (4 Replies)
Discussion started by: sdosanjh
4 Replies
BTAG(1) 							    btag Manual 							   BTAG(1)

NAME
btag - A command line based multimedia tagger SYNOPSIS
btag [options] path1 [path2] [path3] ... DESCRIPTION
btag is a TagLib-based command line multimedia tag editor that attempts to automate the process of tagging a lot of files at once. It uses the tags found in the supplied files as well as interactive user input to determine new values for the tags. It can also optionally rename files and directories based on those new values. You can supply paths to files or directories to btag. Directories are recursively traversed and all files found are tagged. Directories are also handled differently in the sense that btag will attempt to keep information about the previously tagged files to provide sane defaults for all other files in the same parent directory. Only files with file extensions supported by TagLib are considered. OPTIONS
-D/--dry-run Don't do anything, just show what would have been done (dry run mode) -d/--dir-rename-format format Use format to rename the directories where the multimedia files were found -i/--input-filter filter Use filter as the input filter -f/--filter filter Use filter as both the input and the output filter -h/--help Display usage information and exit -n/--renaming-filter filter Use filter as the renaming filter -o/--output-filter filter Use filter as the input filter -r/--file-rename-format format Use format to rename the multimedia files -t/--title-locale locale Use locale for proper (although lax) locale-specific title casing INPUT AND OUTPUT FILTERS
btag supports input and output filters that are applied to the text fields (artist, album and song title). Those filters can protect against basic mistakes such as duplicate whitespace. Input filters are used on the tags as they are loaded from the multimedia files. This filtered information is used to provide suggestions to the user when the interactive tagger requests information for those text fields. If an output filter is configured, the user input is then filtered, and if the filtered text does not match the user input, the user is asked for confirmation. In most cases, the input filter should match the output filter (which is why the -f option is handy). You may choose to specify only an input filter, in which case the user input is not filtered. If you don't specify an input filter, though, the default input filter will be used. The currently available filters are: basic Provides basic filtering by removing duplicate or trailing whitespace, is the default input filter and the base for all other filters first_upper The first character in the field is uppercased, while all others are lowercased lower All characters are lowercased title The first character of each word is uppercased (with exceptions), while all others are lowercased upper All characters are uppercased The title capitalization algorithm will follow locale-specific context-insensitive rules depending on the value of the -t parameter. Note that strict title capitalization rules often depend on the context in which the words are used, the precise analysis of which is much beyond the scope of btag. The currently supported title locale specifications are: en English (default) es Spanish RENAMING FORMATS
If a format is specified with the -r option, the tagged multimedia files are renamed accordingly. Likewise, if the -d option is used, the directory in which multimedia files were tagged is renamed according to the specified format. The specified format is converted to a file or directory name using the following substitutions: %artist Artist name %album Album name %year Year of release %track Track number (only replaced by the -r option) %title Song title (only replaced by the -r option) Renaming happens after the tags are written, and it's relative to btag's working directory. For directory renaming, the last known artist, album and year information is used. Only directories that contain files that were tagged by btag are renamed. btag does not prevent you from overwriting existing files using the formats described here. RENAMING FILTERS
Renaming filters are used to ensure that the file and directory names generated using the renaming formats (if specified) are valid (safe) in the context of the current file system. The following renaming filters are currently available: conservative Conservative character replacements are performed, recommended for FAT32 file systems unix Generates file and directory names that should be valid in an Unix environment (default) EXAMPLE
Using title casing with English rules and sensible renaming formats generating FAT32-safe file and directory names: $ btag --file-rename-format '%track. %title' --dir-rename-format '%album (%year)' --filter title --title-locale en --renaming-format conservative /path/to/myalbum Using an input filter only: $ btag --input-filter lower /path/to/myalbum btag 2011-06-04 BTAG(1)
All times are GMT -4. The time now is 03:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy