last day (15 days later) » 

8:58 PM
0
Q: Pass a list of filenames from a .txt to a find and copy command

AshBradI have a .txt file with a list of xml file names. I need to take each xml file and pair it to an image of the same name somewhere else in my directory. I already use sed to clean the .xml from the file name Text File Example: DF_0001.jpg.xml DF_0002.jpg.xml After 'sed' cleaning: DF_0001.j...

 
Sure... I have a list of xml files in a text document. They correspond to image files elsewhere in my directory. I'd like to step through that list of files, find the corresponding image and then move the xml to its same directory..
@Travis - yes I do. I'll edit my original post right now to be more clear about location. Thank you!
 
When you say: My .txt file containing the xml file list is here. you are showing an .xml file. It's confusing to me, ¿is it a .txt or an .xml?
 
@jaba10 - you're right. this is confusing. I'll edit above. What I mean is, the .txt file listing all of the xml files is in the same directory as the xml files. Is that more clear? Thank you!
 
Could you give us an example of the las step?
 
The last step (the move) is what I need help with. I don't have an example of this
 
8:58 PM
Look at my answer and tell me if that's wthat you're looking for. I asked for an example in the way: mv /Images/JPG/Day2/DF0005.jpg /Sites/csv/DF_0005.jpg.xml -> is it a good example?
 
9:13 PM
I think I caught what you're looking for:
mv /Sites/csv/<some>.jpg.xml /path/to/some/some.jpg
Is that right?
If so, you can try the command in my answer. You can try it with cp instead of mv
If it works as you want, you can replace the cp for mv
 
 
1 hour later…
10:29 PM
Hi AshBrad
I think you're using the old version I posted
Because in the error you have a | that isn't in the code.
Would you post your code in move.sh so I can help you?
 

last day (15 days later) »