Mac Copying Files from Package Files

Tomar

macrumors member
Original poster
May 21, 2008
60
0
Hello

I'm trying to copy a file with a specific extension out of a package file and into another directory.

I used the following in terminal:

cp filename.package/*.txt .

I keep getting the following error:

cp: filename.package/*.txt: No such file or directory

What am I doing wrong???
 

Terminated

macrumors newbie
Mar 18, 2014
6
0
Hello

I'm trying to copy a file with a specific extension out of a package file and into another directory.

I used the following in terminal:

cp filename.package/*.txt .

I keep getting the following error:

cp: filename.package/*.txt: No such file or directory

What am I doing wrong???
I can think of two possibilities:

1) It may be that filename.package is not in the current working directory.

2) Or it may be that there is no file with extension .txt in the first level of the directory filename.package.

Both situations would cause the same error message.
 

Tomar

macrumors member
Original poster
May 21, 2008
60
0
I can copy the file using the aforementioned command if specify the filename

cp filename.package/textfilename.txt .

However, it doesn't seem to work when I try to use the wildcard

cp filename.package/*.txt .

The name of the text file changes when a new package file which is why I'm trying to copy it using a wildcard and the file extension
 

chown33

Moderator
Staff member
Aug 9, 2009
8,447
4,449
Pale blue comma
Post the output of this command line:
Code:
ls -ld filename.package ; ls -la filename.package ; id
Copy and paste the exact command-line into Terminal. Copy and paste the complete unchanged output into a reply here, including any error messages that may appear.