Sponsored Content
Top Forums Shell Programming and Scripting Rename multiple file names in a directory Post 302524165 by hari001 on Sunday 22nd of May 2011 03:52:21 AM
Old 05-22-2011
Java Rename multiple file names in a directory

I hope some one can help me

I have multiple files in a directory with out extension like as below mentioned. But i want to change all the file names along .DDMMYYYYHHMISS format. And all files should have same DDMMYYYYHHMISS.

Scenario:

direcory name = /vol/best/srcfiles

files in a direcory

Payor
customer
vendor
Employee


I want the files names as below

Payor.05222011035216
customer.05222011035216
vendor.05222011035216
Employee.05222011035216


Thanks,
 

10 More Discussions You Might Find Interesting

1. OS X (Apple)

changing multiple directory names w/ sed

ive looked and couldnt find an answer... can someone tell me how i can replace spaces and characters with an "_" on multiple folders? thanx muchly. (1 Reply)
Discussion started by: RahJiggah
1 Replies

2. Shell Programming and Scripting

Searching for file names in a directory while ignoring certain file names

Sun Solaris Unix Question Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Discussion started by: 2reperry
2 Replies

3. Shell Programming and Scripting

Find and rename long file names (html)

Hi Guys, I need a help. I have 1130 zip files. Each one of them has files including 1 html file with long file name (includes special charactors, Alphabetic and numbers). I have copied all 1130 zip files to my linux system and extracted using below command. Find . -name "*.zip" -exec... (7 Replies)
Discussion started by: Rajmani
7 Replies

4. Shell Programming and Scripting

Grepping file names, comparing them to a directory of files, and moving them into a new directory

got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies

5. Shell Programming and Scripting

changing multiple directory names

Hi guys, I have lots of files that look like: ABC.packed.dir DEF.packed.dir GHI.packed.dir etc... I would like them to have more of the usual naming convention ABC DEF GHI etc... so I was thinking that I could: (2 Replies)
Discussion started by: atjurhs
2 Replies

6. Shell Programming and Scripting

Trying to do multiple dir's and multiple file names etc.

What am I missing? find: 0652-009 There is a missing conjunction find: 0652-009 There is a missing conjunction find: 0652-009 There is a missing conjunction find: 0652-009 There is a missing conjunction find: 0652-009 There is a missing conjunction find: 0652-009 There is a missing... (3 Replies)
Discussion started by: xgringo
3 Replies

7. Shell Programming and Scripting

Fetch the last two days directory names and rename them

Hi All, I have below directory structure and from these directories, I would like to fetch the last two days list of directories and append a '0' (zero) to those directories. bash-4.1$ ls -lrt total 32 drwxr-xr-x+ 6 root root 9 Sep 5 01:05 tested-597 drwxr-xr-x+ 6 root root 9 Sep 9... (3 Replies)
Discussion started by: ibad_urs
3 Replies

8. Shell Programming and Scripting

How to rename multiple file names?

Hi all, I need to rename more file name in one command or script. The files have this structure: XxY - filename.doc where X and Y are numbers and the x is the letter itself. I need to rename these files with this structure: string.S0XEY.filename.doc the string is a suffix that... (8 Replies)
Discussion started by: idro
8 Replies

9. Shell Programming and Scripting

Rename files from multiple directories along with directory indicator

Hi, Friends, i have a requirement where i need to rename my files residing in multiple sub directories and move them to one different directory along with some kind of directory indicator. For eg: test--is my parent directory and it has many files such as a1.txt a2.txt a3.txt ... (5 Replies)
Discussion started by: gnnsprapa
5 Replies

10. UNIX for Beginners Questions & Answers

Rename the file name from Parent directory

Hi All, Just started learning unix and stuck into below issue. Suppose i have folder structure as below. Dir1/Dir2/Dir3/File1.msg I am looking to rename the file name from File1.msg to File2.msg but from the parent Dir1 From Dir3 i can easily run the command like mv File1.msg... (2 Replies)
Discussion started by: Gurjeet Singh
2 Replies
MACSTREAM(1)						      General Commands Manual						      MACSTREAM(1)

NAME
macstream - Convert a series of files to a MacBinary stream SYNOPSIS
macstream [ - options ] files DESCRIPTION
macstream takes the files specified in files and combines them to a MacBinary stream on standard output subject to the options specified. If files also specifies directories they are followed recursively, and all files found will be put in the MacBinary stream, together with directory information. OPTIONS
In the absence of any options, macstream takes the specified files and silently combines them to a MacBinary stream, writing the result to standard output. Directories named in files are followed recursively, all files found will be put in the MacBinary stream, together with directory information. Files are assumed to be in MacBinary format. However, if the filename ends with .info the file is assumed to be the info fork of a MacIntosh file split amongst more than one file. In that case the files with .data and .rsrc extension are also read (if present). Also, if the info fork is mentioned in the parameter list, the names of data and resource forks can also be mentioned, but those will be ignored (this is to allow wild-card expansion by the shell.) Further, if some form of AppleShare is supported by the installed program, and if the current directory, or one of the directories found during recursive processing, is a directory in the format of the supported version of AppleShare, those files will be handled according to the properties of AppleShare. -r No intelligent file-processing is performed; all files named are assumed to be plain resource files, and are written as MacIntosh resource files with creator "RSED" and type "RSRC", unless another creator and/or type are specified. -d No intelligent file-processing is performed; all files named are assumed to be plain data files, and are written as MacIntosh data files with creator "MACA" and type "TEXT", unless another creator and/or type are specified. -u As -d, but the codes for CR and LF are interchanged. -U Is a synonym for -u. -c creator Defines the creator name to be used if one of the previous options is specified. -t type Defines the type name to be used if one of the previous options is specified. -l List every file and directory processed. -i Do not output files, give information only (implies -l.) -q Ask the user for every file/directory whether it should be visited (implies -l.) -V Gives the patchlevel of the program, and other information. Other options are ignored and the program quits immediately. -H Give short information about the options. Other options are ignored and the program quits immediately. BUGS
As this is a beta release, there may still be some problems. SEE ALSO
macutil(1) AUTHOR
Dik T. Winter, CWI, Amsterdam, The Netherlands (dik@cwi.nl) 3rd Berkeley Distribution October 22, 1992 MACSTREAM(1)
All times are GMT -4. The time now is 05:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy