Name: Anonymous 2012-01-04 12:16
Hey /prog/, what scripts have you been working on? I just made this simple on that I really needed to change all spaces in folders to underscores:
Show us your latest scripts and feel free to rewrite mine and others in other languages!
#/usr/bin/env python
import os
def main ():
current_dir = os.getcwd ()
current_dir_list = os.listdir (current_dir)
for current_file in current_dir_list:
os.rename (current_file, current_file.replace (" ", ""))
if __name__ == "__main__":
main ()Show us your latest scripts and feel free to rewrite mine and others in other languages!