ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Active_prgs/eRoom_MultiFileAdd.py
Revision: 8
Committed: Sat May 5 04:21:19 2012 UTC (13 years, 10 months ago) by ninoborges
Content type: text/x-python
File size: 1380 byte(s)
Log Message:
Initial Import

File Contents

# Content
1 """
2 Version .01
3 Created by Emanuel Borges
4 8.15.06
5
6 This program will allow for the Fast Adding of lots of files into the eRoom by creating an
7 AUT on the fly from a dir of files that need to be added. So sub-dirs for now, please.
8 """
9
10 import os
11
12 def AddFirst(mainDir, workDir, file):
13 output = open(workDir+'multi-add.aut', 'w')
14 output.write('WinWaitActive, McGuinn\nSend, +{TAB 17}\nSend, {ENTER}\nWinWaitActive, Add File\n; First one, make sure to check the "add more" check\nSend, {TAB}\nSend, %s%s\nSend, {TAB 3}\nSend, {SPACE}\nSend, {TAB 8}\nSend, {ENTER}\n'%(mainDir, file))
15
16
17 def AddMore(mainDir, workDir, file):
18 output = open(workDir+'multi-add.aut','a')
19 output.write('WinWaitActive, Add File\n; Put Regular ones here\nSend, {TAB}\nSend, %s%s\nSend, {TAB 11}\nSend, {ENTER}\n'%(mainDir, file))
20
21 def Complete(workDir):
22 output = open(workDir+'multi-add.aut','a')
23 output.write('; close and hit cancel\nWinWaitActive, Add File\nSend, {TAB 13}\n')
24
25 if __name__ =='__main__':
26 first = 0
27 mainDir = "\\\\mwcase01\\images\\Georgia_pacific\\CaseData\\eDocs\\Image\\working\\"
28 workDir = "c:\\test_dir\\"
29 for file in os.listdir(mainDir):
30 if first == 0:
31 AddFirst(mainDir, workDir, file)
32 first = 1
33 else:
34 AddMore(mainDir, workDir, file)
35 Complete(workDir)