Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add prefix to names in directory python

Python script.

import os
[os.rename(f, f.replace('', 'xyz_')) for f in os.listdir('.') 
if not f.startswith('.')]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #prefix #names #directory #python
ADD COMMENT
Topic
Name
6+1 =