Sponsored Content
Full Discussion: copy and rename file..
Top Forums Shell Programming and Scripting copy and rename file.. Post 302478530 by shubhig15 on Wednesday 8th of December 2010 06:37:18 AM
Old 12-08-2010
Quote:
Originally Posted by k_manimuthu
install 'File::Copy::Recursive' module and mentioned your your input_dir and output directory at the corresponding place.
Code:
perl -e 'use File::Copy::Recursive qw(dircopy); dircopy('/home/input_dir', '/home/output_dir');

thanks..i dose not want code in perl..i want shell script in c
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

copy and rename list of files

Hi all, I am a newbie in writng unix..I am using ksh shell..Does anyone know how to copy a list o files from directory A to directory B with differnt names? i.e in Dir A, I have RPT101.555.TXT RPT102.666.TXT and I want to copy those files to dir B with new naming convention.. in Dir B,... (7 Replies)
Discussion started by: kinmak
7 Replies

2. UNIX for Dummies Questions & Answers

Mass Copy/rename

Don't tell me DOS can do something UNIX can't do! I want to copy a number of files from one directory to another, and at the same time change the names. The name changes would be common, e.g., all files starting with the letter 'L' and ending in '30.NEW554', with the copied or new files also... (6 Replies)
Discussion started by: lwilsonFG
6 Replies

3. Shell Programming and Scripting

copy/rename file as date() unix/shell

File.jpg I want to copy and rename this as 2008-12-02.jpg I tried this copy File.jpg date '%y-%m-%d-%H:%M:%S'.jpg This doesnt work.... what do i do? (1 Reply)
Discussion started by: hdogg
1 Replies

4. Shell Programming and Scripting

Copy 1 file 5000 times and Rename each +1

Hi, Found lots of stuff that is close but no cigar... I have a file ie. a.txt, and I want to copy it to another directory 5000 times and call it: a1.txt a2.txt ... a5000.txt Struggling to put a loop together in this new world of AIX. please include full script for me to understand... (3 Replies)
Discussion started by: terry2009
3 Replies

5. Shell Programming and Scripting

Copy files from folder and rename them

hello, I need to build a shell script that receives the folder to copy by parameter and copy all files except thumb.db to another folder and rename them like, file.jpg renamed to file_bb1.jpg. can someone help me Thanks (4 Replies)
Discussion started by: zeker
4 Replies

6. Shell Programming and Scripting

Files rename and copy

hello, I am write a Script and i would listing all Files from Path1 out with DSR*.txt and give a new name an copy to the Path2. I have problems with that to rename. Someone can help me? Sorry, for my english. My english is not gut. I hope you understand my. That is my Script. ... (2 Replies)
Discussion started by: efeijoo
2 Replies

7. Shell Programming and Scripting

.sh file To rename existing file and copy new file

Hi All, I am very new to shell scripting . In my current task i want to create .sh file that will rename the existing file with appending _bu in it. And then copy new file . e.g if i have file linuxFirst.java then i want to rename it to linuxFirst_bu.java ..Then want replace with latest... (1 Reply)
Discussion started by: maheshkaranjkar
1 Replies

8. Shell Programming and Scripting

[Solved] copy + rename

Hi, I was thinking that this should be a synch but I could never get it to work. I want to copy a bunch of files within a directory (3/4 levels into the directory) to a common place. All these files have the same name, so I prefer to rename them with the path. I tried with files=`ls -1... (5 Replies)
Discussion started by: jamie_123
5 Replies

9. 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

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
Publican(3)						User Contributed Perl Documentation					       Publican(3)

NAME
Publican - Used to control settings for sub modules. VERSION
This document describes Publican version $VERSION SYNOPSIS
use Publican; my $publican = Publican->new({DEBUG => 1}); DESCRIPTION
Handles general configuration of all sub modules. INTERFACE
_load_config Private method for loading a config file _validate_config Private method for validating configuration new Create a Publican object. my $publican = Publican->new({debug => 1}); Parameters: configfile Override Configuration file to use. debug Use debug mode for messages. common_config Override path to coomo configuration files. common_content Override path to common content files. debug_msg Print out debugging information. param Return the current value of a configuration parameter $publican->param('debug'); help_config Display a list of config file parameters and a short description of them. dir_list list all the files in a directory, and its sub-directories, matching the supplied regex. get_all_langs Get all valid language directories. logger Log something, currently emits to STDOUT TODO: consider using Log::Dispatch or similar valid_lang Is the requested language valid according to I18N::LangTags::List maketext Get localised strings get_abstract Return the abstract for the supplied language with all white space truncated. get_subtitle Return the subtitle for the supplied language with white space truncated. get_author_list Return the author list for the supplied language. get_contributors Return the contributor hash for the supplied language. get_keywords Return the contributor hash for the supplied language. get_legalnotice Return the legal notice for the supplied language. get_draft Is the book in draft mode?. run_xslt Apply the supplied xslt file to the supplied XML and return a string of the output. new_tree Create a new XML::TreeBuilder object with the required attributes for DocBook. TODO: Make XmlClean use this. dtd_string Returns a valid DTD for the DocBook tag supplied. Parameters: tag The root tag for this file dtdver The DTD version ent_file An entity file to include (optional) print_banned_tags Print a list of tags that are not supported. add_revision Add a full entry in to the revision history. get_ed_rev Get the current edition (version) and release from the Revision History file. Parameters: language, bump. If bump is set the returned revision will increment before it's returned. fcopy UTF8 escape calls to File::Copy::Recursive fmove UTF8 escape calls to File::Copy::Recursive rcopy UTF8 escape calls to File::Copy::Recursive rcopy_glob UTF8 escape calls to File::Copy::Recursive dircopy UTF8 escape calls to File::Copy::Recursive DIAGNOSTICS
"unknown args %s" All subs with named parameters will return this error when unexpected named arguments are provided. "%s is a required argument" Any sub with a mandatory parameter will return this error if the parameter is undef. "Config file not found: %s" publican can not find the named configuration file. "Failed to load config file: %s" The named configuration file could not be loaded. "Can't locate required file: %s" A file required for processing could not be found. "title not found in Info file" The <type>_Info.xml file does not contain a title tag. "productname not found in Info file" The <type>_Info.xml file does not contain a productname tag. "productnumber not found in Info file" The <type>_Info.xml file does not contain a productnumber tag. "pubsnumber not found in Info file" The <type>_Info.xml file does not contain a pubsnumber tag. "Failed to load brand default config file" A detected defaults.cfg for the current brand could not be loaded. "Failed to load brand overrides config file" A detected overrides.cfg for the current brand could not be loaded. "Could not create a Publican::Localise object" Could not create a Publican::Localise object "Can't open directory" CONFIGURATION AND ENVIRONMENT
Publican requires no configuration files or environment variables. DEPENDENCIES
Carp version Config::Simple XML::TreeBuilder I18N::LangTags::List Term::ANSIColor File::Find::Rule; Publican::Localise; INCOMPATIBILITIES
None reported. BUGS AND LIMITATIONS
No bugs have been reported. Please report any bugs or feature requests to "publican-list@redhat.com", or through the web interface at <https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Publican&amp;component=publican>. AUTHOR
Jeff Fearn "<jfearn@redhat.com>" perl v5.16.3 2014-06-10 Publican(3)
All times are GMT -4. The time now is 08:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy