Sponsored Content
Top Forums Shell Programming and Scripting Copy files on a list to another directory Post 302537544 by Bloomy on Friday 8th of July 2011 01:03:30 PM
Old 07-08-2011
Thanks! I tried the first option but I received the error

Code:
cp: target `testfile.wav' is not a directory

I executed it like this:

cd'ed into the wav file directory and then:

Code:
< ../list.data xargs cp -- -t ./target_directory


Last edited by radoulov; 07-08-2011 at 05:05 PM.. Reason: Code tags!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copy files from one directory to another

I need to copy about 13 Tb of data from one directory and subdirectories to the other (another mount point). If I run this as a cron, say between 10 pm and 7 am, not all of the files will be copied over. Is there a way of 'resuming' the copy the following evenings until all files are copied over? (0 Replies)
Discussion started by: hd2006
0 Replies

2. Shell Programming and Scripting

find list of files from a list and copy to a directory

I will be very grateful if someone can help me with bash shell script that does the following: I have a list of filenames: A01_155716 A05_155780 A07_155812 A09_155844 A11_155876 that are kept in different sub directories within my current directory. I want to find these files and copy... (3 Replies)
Discussion started by: manishabh
3 Replies

3. Shell Programming and Scripting

how can i copy a list of files with different names into others directory have the same name

dear all. how can i copy a list of files with different names into others directory have the same name like i have 3 files 10_10 10_10_11 10_10_11_12 and i have 3 directories 10_10 10_10_11 10_10_11_12 how can i make a loop to cp this files into the directory have the same name like... (0 Replies)
Discussion started by: t17
0 Replies

4. UNIX for Dummies Questions & Answers

How can i copy a list of files with different names into others directory have the same name?

dear all. how can i copy a list of files with different names into others directory have the same name like i have 3 files 10_10 10_10_11 10_10_11_12 and i have 3 directories 10_10 10_10_11 10_10_11_12 how can i make a loop to cp this files into the directory have the same name like... (31 Replies)
Discussion started by: t17
31 Replies

5. UNIX for Dummies Questions & Answers

How to copy all files into the same directory

Dear All, Again I have another simple question. :confused: I want to write a csh which can copy all files of a current directory with a new name in the same directory, I mean: If I have tree bird apple as files in a directory I want to give ,say number 007 as argument to my csh and it copies... (3 Replies)
Discussion started by: dreamer0085
3 Replies

6. UNIX for Dummies Questions & Answers

Copy files into another directory

I have a folder will a lot of documents (pdf, xls, doc etc.) which users have uploaded but only 20% of them are currently linking from my html files. So my goal is to copy only the files which are linked in my html files from my Document directory into another directory. Eg: My documents exist... (5 Replies)
Discussion started by: ankitha
5 Replies

7. Shell Programming and Scripting

Copy list of files from a keyword list to another directory

Hello, I have a folder with a massive amount of files, and I want to copy out a specific subset of the files to a new directory. I would like to use a text file with the filenames listed, but can't get it to work. The thing I'm hung up on is that the folder names in the path can and do have... (5 Replies)
Discussion started by: twjolson
5 Replies

8. Red Hat

Unable to copy files due to many files in directory

I have directory that has some billion file inside , i tried copy some files for specific date but it's always did not respond for long time and did not give any result.. i tried everything with find command and also with xargs.. even this command find . -mtime -2 -print | xargs ls -d did not... (2 Replies)
Discussion started by: before4
2 Replies

9. Shell Programming and Scripting

Copy the files in directory and sub folders as it is to another directory.

How to copy files from one directory to another directory with the subfolders copied. If i have folder1/sub1/sub2/* it needs to copy files to folder2/sub1/sub2/*. I do not want to create sub folders in folder2. Can copy command create them automatically? I tried cp -a and cp -R but did... (4 Replies)
Discussion started by: santosh2626
4 Replies

10. Shell Programming and Scripting

How to copy selective list of files to a directory?

Hi I have 3 directories indexes_with_ts indexes_without_ts process_indexes in each directories it contains *.sql how do I accomplish this: for all the files found in indexes_without_ts, copy the corresponding file in indexes_with_ts to process_indexes. i.e. for... (2 Replies)
Discussion started by: jediwannabe
2 Replies
PCP(1)							   http://synce.sourceforge.net/						    PCP(1)

NAME
pcp - copy files SYNOPSIS
pcp [-d LEVEL] [-p DEVNAME] [-h] [:]SOURCE [[:]DESTINATION] DESCRIPTION
pcp copies a file on a device connected through SynCE or between a device connected through SynCE and host PC. Forward slashes ('/') in remote file names specified on the command line are converted to backward slashes (''). This tool must be run as the same user as the dccmd daemon. OPTIONS
-r Copy directories recursively. -d LEVEL Set debug log level: 0 - No logging (default) 1 - Errors only 2 - Errors and warnings 3 - Everything -p DEVNAME Use the device with the given name, instead of the default. -h Display help message. [:]SOURCE Full path to the source filename. When the filename is prefixed with a colon (':'), it will be treated as a remote filename, other- wise as a local filename. [:]DESTINATION Full path to the destination filename. When the filename is prefixed with a colon (':'), it will be treated as a remote filename, otherwise as a local filename. If this parameter is omitted and the source filename is local, the local file will be copied to a file with the same name in the "My Documents" directory on the device connected through SynCE. If this parameter is omitted and the source filename is remote, the remote file will be copied to a file with the same name in the current directory. EXAMPLES
Copy a file from host computer to remote device: pcp download/game.cab ":/Temporary Files/game.cab" Copy a file from remote device to host computer: pcp ":/My Documents/snore.wav" /tmp/snore.wav Copy a file from host computer to remote device into the "My Document" folder - you can leave off the last parameter: pcp "work/mytext.txt" Copy a file from remote device to host computer into the current directory - you can leave off the last parameter: pcp ":/My Documents/snore.wav" Copy a file from one location on the remote device to another: pcp ":/My Documents/important.pwi" ":/My Documents/important.backup.pwi" AUTHOR
This manual page was written by David Eriksson <twogood@users.sourceforge.net>. SEE ALSO
synce(1) pcp(1) pls(1) prm(1) pmkdir(1) prmdir(1) The SynCE project November 2002 PCP(1)
All times are GMT -4. The time now is 06:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy