If you can find a way to save the file as plaintext with one url per line, you could use the following script on a Linux/MacOS/*nix machine or Cygwin on Windows to spit out a text file with the urls.
#!/bin/bash rm resolved_urls.txt for url in $(cat url.txt); do wget -S "$url" 2>&1 | grep ^Location >> resolved_urls.txt done
Copy the above text into a file called resolve.sh using nano
if you need to, make it executable with chmod +x resolve.sh
, name the file with bit.ly URL's and etc to url.txt, ensuring it is in the same folder as the resolve.sh file, and execute it with ./resolve.sh
. It will create a file called "resolved_urls.txt" with the original URL and it's resolved counterpart.
The output with
http://bit.ly/1auRnQ9 http://bit.ly/19ZkTAI
in url.txt is
http://bit.ly/1auRnQ9 --> Location: http://www.google.com/ [following] http://bit.ly/19ZkTAI --> Location: http://superuser.com/ [following]
This script is far from perfect and may invoke the wrath of various Unix greybeards, but it at least works for bit.ly. Let me know if you have any *nix related questions.