Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy files using * wild card

Status
Not open for further replies.

HydroBob

Technical User
Feb 28, 2002
12
0
0
US
I am trying to copy many files using a command similar to this

exec cp $FILE_DIR/file* $File_DIR2

but the * is not evaluated as meaning all files beginning with
file. What do I need to do to get it to evaluate correctly?
I have tried using eval on it before using exec and haven't had luck with that either. I'm sure it can be done, I just haven't been able to get the syntax right.

Thanks in advance...

Bob
 
Have you considered using the Tcl "file" command, or are you wedded to "exec" for some reason? If not, you would do something like:
file copy [glob $FILE_DIR/file*] $File_DIR2, I think.

Bob Rashkin
rrashkin@csc.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top