Ad blocker detected:
Our software and support is 100% free. This website is not.
You can donate in 2 ways, by turning off your ad blocker or by pressing the Donate button.
************ NOTICE ************
UPDATE YOUR BOOKMARKS!!!
We have an issue that there is no way around as of yet.
I have done all I can to try and prevent this from happening.
We are going to be losing the .com, .org and .de domains.
We have not been able to contact the original author of EventGhost
(the person that owns those domains) to redirect them to the new web server.
I set in motion when we first moved a redirection from the old server to the new server.
I also put in markers so that search engines would see this change and update any pointers
they have. We still have the .net domain for the production site. and the .rocks for the test site.
For the past few months you have been getting redirected to the .net site if you used one of the 3
domains mentioned above. I just wanted to tell everyone so they can make any changes needed.
I'm trying to automate moving files across my network using EG and python scripts, and I thought I would start learning this by doing something simple like opening a file using python. My problem is I get errors using known good methods. I have been successful opening files that are located in my c:\python27 directory but when I try to open files on my desktop or test files that I have dropped directly on my c drive I get errors. What could I be doing wrong? I've tried import os, and using that method to open a file, and I've tried the open method built into python. Here is an error message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
WindowsError: [Error 2] The system cannot find the file specified: 'c:\test.txt'
I started out trying f = open("c:\users\\Username\desktop\test.txt") Then I tried f = open("C:\\users\username\desktop\test.txt) and in both cases I get no such file or directory errors. After this, I moved the test file directly to my c drive, adjusted my script and reran it but I got the same errors. From here I tried import OS, and used os.startfile(test.txt) and this opened a text file located directly in my python directory. When I changed os.startfile to open a file on my desktop it threw an error saying the system cannot find the file specified 'c:\test.txt'
I think I'm going about this wrong because there are a few different ways to do this, and I could end up learning bits and pieces of each without knowing enough about any one method to accomplish my goal. I want to automate moving .wtv files that I have recorded from my living room to my server. I already have the directory watcher plugin installed in EG where the file will be created but when a new file is created it creates a unique event that gives a specific file name where I want an event to be triggered when a certain file type is created (in my case .wtv). I want my triggered event to be read by either a script or another plugin that moves that file to a network location. I have a network share setup through the sharing wizard in windows seven, and I don't use workgroup, homegroup or any of those other networking protocols. I have found some scripts but when I try them I run into the problem listed in my opening statement. How would I best set this up?
ok you are simply trying to move files without changing them i am gathering.
You are going to need to map the network location as a drive on the computer that is running EG. and we will call that drive letter z:.
what I do not know is if the event has the full path and filename or just the filename. so I am going to assume it's just the filename.
Now the problem i see if that the event is going to take place on file creation that does not mean the file is done being written to. this is going to cause errors if not handled properly. I have to do a bit of research to see if I can locate a way to tell if the file is in use. and if I cannot locate a way I am going to have to run some tests to see if it will only do a copy if the file is not in use. it depends on if the file is locked I would gather.
Now because network transfers of large files (video files are large) can take a long while to transfer depending on the speed of your network and the computer those kinds of things. We do not want to cause a hang in EG. so this is going to have to be done via threading or multiprocessing. I am thinking the latter due to how EG only uses one processor and because the overhead of doing this kind of a thing is rather on the taxing side for system resources. so we want to put some pony's behind it. Give me some time to key it all up.
If you like the work I have been doing then feel free to
My recorded TV files don't have to moved immediately so I can solve a few of these problems by scheduling the file move instead. Assuming I do schedule this the only need I would have for directory watcher would be to enable the scheduled task of moving the files but that isn't a neccessity so I can probably cut directory watcher out of the equation. i honestly didn't think of how EG might try to move the file as it is being recorded so I'm glad you brought that up. Just to see how it worked I enabled the directory watcher on my test machine and created a new file. This event log showed this
I'm not sure what the u means but the rest of that statement I get. I already have the destination folder mapped as a network drive. Maybe this would be even easier if I ran a script to empty a folder at midnight every night. The only thing going into my recorded tv folder is tv recordings, and I should probably build some kind of logic into it that checks to see if any new files have been created. After the files have been moved they can be deleted.
/MT = Multi Threaded
/MOV = Moves files (deleting the ones in the source directory)
/R:n = Retry count where n is the number of retries. there is a default wait time of 30 seconds between retries
/TS = Include source file time stamps in the output.
/FP = Include full path name of files in the output.
/LOG+:n = Log to a file where n is the file
these next 2 cannot be used at the same time. you will need to pick one or the other
/MON:n = Monitor for changes. where n is the number of changes that have to occur in the source directory before it will start the move
/RH:2300-0000 = copy the files at a specific time. 24 hour clock
I am not sure on the scheduled time deal if it will restart automatically and you only have to run the command once. this you would have to check.
The file monitoring one will always stay running so it will keep a console window open if launched from the command prompt. you can use EG to hide this using the Run Application action.
If you like the work I have been doing then feel free to
Thanks for the help. For the time being i'm going to run this script manually because I don't want myself or anyone else to set something to record in the middle of the night, and have this script scheduled to run at the same time. I ran this last night before I went to sleep, and I watched the log update over a the course of about a minute so I will check it when I get time to see if I was successful.