summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjr1224@student.uni-lj.si <jr1224@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2015-01-26 01:42:57 +0000
committerjr1224@student.uni-lj.si <jr1224@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2015-01-26 01:42:57 +0000
commitc88b6aa20cc7ad2db1adf0610e46111202aa81ff (patch)
tree71c1302613db9861f6e72dc5fb8961c42141cf4d
parent793efd5a514b50465681e9305842337f547d4020 (diff)
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@234 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
-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)
+
+