-
Terminal wget, rename, and move - [not what you think]
Greetings,
Ok, I bet you are thinking "this has been asked and answered, search the forums before you post n00b" but this is a unique situation with (I hope) a unique solution.
Some background: I used the terminal to download a large amount of .jpg files from www.wizards.com (available for private use) and ended up with (by design) files with names like this:
leaving.asp?url=%2Fdnd%2Fimages%2Fpsi_gallery%2FPs i_1.jpg
leaving.asp?url=%2Fdnd%2Fimages%2Fpsi_gallery%2FPs i_2.jpg
leaving.asp?url=%2Fdnd%2Fimages%2Fpsi_gallery%2FPs i_3.jpg
...and so on.
what I want to know, is it possible to rename these files en masse, and move them based on the resulting name, say:
leaving.asp?url=%2Fdnd%2Fimages%2Fpsi_gallery%2FPs i_1.jpg
leaving.asp?url=%2Fdnd%2Fimages%2Fpsi_gallery%2FPs i_2.jpg
leaving.asp?url=%2Fdnd%2Fimages%2Fpsi_gallery%2FPs i_3.jpg
into
/home/username/dnd/images/psi_gallery/Psi_1.jpg
/home/username/dnd/images/psi_gallery/Psi_2.jpg
/home/username/dnd/images/psi_gallery/Psi_3.jpg
Preferably in some manner that replaces "leaving.asp?url=" with "/home/username" and the remaining "%2F" with "/"
I have already attempted this with Gprename, and as useful as that is it does not do the trick here. If it is not possible I can make do with what I know, but I should really like to have this done properly and organized. Assume the directories are already made.
Any tips, tricks, and how-tos would be appreciated!
Last edited by ntzrmtthihu777; November 4th, 2012 at 08:08 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks