This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Have docker installed on your machine. | |
Copy this file: | |
docker-compose.yml | |
# Use postgres/example user/password credentials | |
version: '3.1' | |
#https://hub.docker.com/_/postgres/ | |
services: | |
db: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys | |
allTheFiles = os.listdir(os.getcwd()) #This is a list of all the files in your directory | |
for filename in allTheFiles: #Each filename is grabed from the list as a string | |
if("Certain String is in the filename" in filename): #This is an additional check to see if there are only certain files you want to change. Else this check is not needed if you want to change all the files. | |
os.rename(filename ,"New file name" + filename[33:]) #os.rename(<oldFileName>,<newFileName>); The filename[10:] is if you may want to keep certain parts of the old file name. For help look up python string methods. | |
print "Rename Complete" |