Hi, excuse my abrupt entrance to this thread,
When asking for help on a script, it's probably a good idea to post the script or at least provide snippets of it. It's difficult to help people with problems such as "My script isn't working, I don't know what the problem is, please help me".
If you expect decent help you must be specific about your problem... Are there any error messages? Or does the script simply hang (no output whatsoever)? You should make some attempt to find out (more information about) the problem prior to resorting to a help forum. You should post any findings you feel are necessary to help others assist you in your problem.
With that out of the way, Docfxit, I have recovered your Python script from the Pastebin links you've given and have reposted your script in a zipped file (attached to this post) for the sole convenience of others, should they be able to help you.
I've examined the Python script, and just as MilesAhead suspected, there are immediate errors with your paths (but hardly to do with spaces); they are entered incorrectly in a Python script nonetheless. I assume you've entered these values yourself, Docfxit.
Code:
logdir = "C:\Programs\CommuniGate Files\SystemLogs\"
submitdir = "C:\Programs\CommuniGate Files\Submitted\"
Two things wrong with the above here.
First of all, specifying a folder path with a trailing backslash is considered incorrect. And this is anywhere in Windows. Try not to add an excess backslash to the end of paths, ever.
Secondly, in Python strings, a backslash is an escape character (a.k.a EOL character). If you want to use a literal backslash, you must escape it by backslash-ing the backslash.
E.g.
logdir = "C:\\Programs\\CommuniGate Files\\SystemLogs"
Alternately, you could specify to Python a
raw string (or literal string) where each character in the string is interpreted literally. Do this by appending an 'r' to the start of a string.
E.g.
logdir = r"C:\Programs\CommuniGate Files\SystemLogs"
Lastly, there is a very minor syntax error on line 904, where
Code:
outstring += (val + ":").ljust(stats_len + 2) +
should have an EOL (end of line) character on the end of the line. For instance:
Code:
outstring += (val + ":").ljust(stats_len + 2) + \
The EOL character is need on the end here because this line of Python code continues on the next line. I have no idea why it is missing one.
It is up to you, Doc., to find and fix these three bad lines (hint: 10, 11, 904).
On a side note, your Batch file, you should be using the '
pause' command instead of '
cmd' if you want to view the scripts' output. (
pause halts script execution until a keypress.)