Copying files while referencing a text doc - Idiots guide please =]

Associate
Joined
4 Jan 2011
Posts
2,169
Hey guys,

Please forgive the n00bishness of the query, and don't slate me too much if you can restrain yourselves.

I have a list of files (one per line) in a text document, that I need to copy from a portable drive to our internal RAID.

I was told to use this command:

for i in `cat H_S_ALL_CLIPS`; do cp $i /path/to_destination/ ; done

My understanding of this would be that:

The H_S_ALL_CLIPS is the text file. Im ok with that part.

The /path/to/destination is "path to destination" i.e. where I want the files to go.

Now I've tried a couple of times to make this work, but the initial thought for me was that "path" was where the files are and "to_destination" is where I want them to go... I've looked around on a couple of forums but everyone seems to talk about this within the context of knowing what they are doing when it comes to this kind of thing...and I don't.

Anyway if someone could give me some assistance I'd appreciate it. I'm using Terminal in OSX if that makes a difference.

Cheers,

Dave.
 
Perfect. I wondered if this was the case. The files are split pretty heftily actually, I think its 7 main folders, each with 50 folders, each with a file in. And the list I was give that was meant to work only has the file names in them.

I thought that if I moved the text file to the top of the folder tree and did it that the files would be picked up in some way - I also assumed the guy that gave me the info gave me ALL of the info I needed, seeing as I'm still trying to wrap my head around this kind of thing.

By the sounds of it the manual route is going to be quicker and safer for the time being, deadlines an all that jazz to deal with....

Thanks for clearing that up, as he had written it as path/to_directory it made it look like it was a from_X/to_destination_Y. Hence the initial confusion.

Cheers dude =]
 
I have done it manually, but appreciate the follow up anyway Illusion :)

All of the filenames are unique, as they are clips taken from a RED camera. I'll give this a go the next time that I have cause to do another transfer, and will indeed look into bash when I get the chance as well.

Cheers,

Dave.
 
Back
Top Bottom