summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kpov_judge/tasks/copy_rename_20_files_tail_env/task.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
index d970288..bc4535c 100644
--- a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
+++ b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
@@ -172,3 +172,17 @@ def prepare_disks(templates, params):
# d = templates['simpleArbiterDhcp']
pass
+#preimenuj vse datoteke tako, da zmenjas minuse s podcrtaji
+def rename():
+ import os
+
+ for filename in os.listdir('.'):
+ os.rename(filename, filename.replace('-','_'))
+
+#napisi cimkrajsi ukaz, ki vse datoteke iz /home/user/mapa/mojimenik premakne v /hostuser/novi
+def mv_novi():
+ import os
+ for filename in os.filename("/home/user/mapa/mojimenik/"):
+ os.rename('/home/user/mapa/mojimenik/' + filename, '/home/user/novi/' + filename)
+
+