Hello,
To trigger a task when a file, say a text file is created in a particular folder and to open that text file that is created, do as follows:
* Create 3 folders, say temp, temp_2 and final.
* Set the trigger on Temp folder i.e to run a task when new file is created in this folder. Keep this folder empty.
* Now, to open the newly created file what you can do is use 'Copy file(s)' command and copy c:\temp\*.txt to c:\temp_2
* Before copying file from temp to temp_2 empty the folder by using 'Delete File(s)' command and delete c:\temp_2\*.txt
* Copy c:\temp\*.txt to c:\final . The final folder will contain all the files created in temp folder(which will be emptied after file is created)
* Use 'Delete File(s)' command and delete c:\temp\*.txt after file is copied to temp_2 and final folders
* Now, rename the file in temp_2 folder. This is because we have to open the file and we need to know its name, so rename c:\temp_2\*.txt to test.txt (for e.g)
* Using 'Open Program\files' command open c:\temp_2\test.txt
This way you can open the newly created file in a particular folder. All the files created will be copied to Final folder.
The task would look something like as follows:
1 Delete Files "c:\temp_2\*.txt"
2 Copy Files "c:\temp\*.txt" to "C:\temp_2"
3 Copy Files "c:\temp\*.txt" to "C:\Final\"
4 Delete Files "c:\temp\*.txt"
5 Rename Files "c:\temp_2\*.txt" to "Test.txt"
6 Open "c:\temp_2\test.txt "
Please find the attached zip file including the sample task file(.atmn)
|