Skip to content

Instantly share code, notes, and snippets.

@gumblex gumblex/urlrename.py

Created Feb 16, 2017
Embed
What would you like to do?
Simple script to get rid of url escaped filenames.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import urllib.parse
for f in sys.argv[1:]:
os.rename(f, urllib.parse.unquote_plus(f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.