Hi,
does anyone understand the timezone conversions?
I found I cannot see the "real" timestamps of the files in a share in Asia when I mount it to my server in Pacific NW.
I thought I can do the following and it will give me the results I want but it did not.
time_today_KL =...
Hi,
I need to pass a User name and a Pass to the PS script.
I tried to find it online but could not.
Ant idea how to do this?
Invoke-Command -Computer DESK-2.domain.somecorp.com -Scriptblock {C:\Python39\python.exe 'C:\temp\DT_Col\HN.py'}
thank you.
Greetings!
I have never used PS.
I'm trying to get PS script to get processes running on a remote computer.
Microsoft documents have this example "Get-Process -Name PowerShell -ComputerName localhost, Server01, Server02"
But like everything at Microsoft, it is confusing and not clear.
I tried...
Hi,
I need to append some of the rows in a .csv file from another file. I have never done it before, I found some snippets online to do that.
I thought I should do it line by line.
First, I wanted to find lines for appending in a File1, then find the same in a File2 and use the last element of...
Hi,
I have a directory with bunch of subdirectories each subdir has a one file only,
I need to process files only form the subdirectories that have letter “H” in a name.
Each file will contain lines with the words "CELL-1", "CELL-2" up to "CELL-12 "- I’m interested in those lines .
I'd like to...
Greeting!
I’m trying to print 4 lines before and after a “match” found in a line.
I do not understand how to do it with my current knowledge of Python Confused but I found 2 snippets,
One finds lines Before the match and one After the match. Need help putting them together.
Thank you.
from...
Hi,
Does anybody knows how to add times in Python?
Need to add HH:MM:SS:MS
The file goes like this:
5/1/2020 2:40:31 PM, 5/1/2020 2:43:11 PM, 00:02:40.5449136,
5/1/2020 2:45:26 PM, 5/1/2020 2:48:17 PM, 00:02:50.8250927,
the third column is a timduration, need to sum it up.
Thank you.
Trying to pull out paired lines, LINE 1 and LINE 2 from a file for farther processing.
The file goes like this:
Some lines
LINE 1
Some lines
Some lines
LINE 2
LINE 2
LINE 2
Some lines
Some lines
Some lines
LINE 1
Some lines
LINE 2
And so on.
I’d like to print:
LINE 1
LINE 2 (preferably last...
Hi,
I have a problem with printing.
If I place a print statement after the forth 'IF' statement I have an error (see below)
If I place a print statement after the third 'IF' statement - no errors
Here is the error:
print ("All Lines -->> ", str_t, endt_p, rnt_p, prg_np, '\n')
NameError...
Need help, I’m new to python,
I wrote a script that should find all files in a directory and process only ones that have a specific line and skip the ones that do not have the line. The specific line is ‘," Run Time’ it fails to process ONLY files I need, it processes all files.
All Lines to...
Hi,
I'm trying to read subdirectories only (with the path) but the code I found also prints the top dir+path that is "C:\\01'
I probably could write the output to a file and then would remove the first line from it but it is kind of unnecessary work.
Thank you in advance.
Here is the code...
Hi,
I hope everyone is well and healthy and staying at home!
And for some reason when I posted my code it removed the "tab" before some lines. Sorry about that!
I tried to use <code> button and the "Superscript" and "Subscript" still the snippet lost it's "tabs'.
Anyway, I have a strange...
Hi, need help again.
I have a file and it can have one line or many lines with the words I'm trying to match
Words to match:
"... Lot End..."
I need to capture the last line that has this occurrence.
I thought I could just push all the match lines to an array and then get the last element but...
Hi,
Need to print only the first line that has a match ...
I have a line in a file :
“ 2019-02-02 17:12:02.860,10552 ,Information," Test Program Name: Something else“
And the part of the line I need is - “Test Program Name: Something else”
I’d like to print only first line that matched...
I got 3 scripts.
1st script scans subnets and prints out Active and not Active IPs.
2d script opens file with Active IPs and finds corresponding Active Hosts names.
3d script opens file with the Active Hosts names and pulls out some stuff from it.
When I ran each script separately, I have no...
Hi,
there are a lot of snippets on how to do this, I probably tried 90% of them by now but nothing is working.
I started writing in Python, I never thought such a simple thing like a calling other script would be that complicated, what a pile of crap this Python is.
Any way, is anybody has a...
Hi,
I’d like to build a graph using Perl, I know nothing about using GD module but I thought Google will help-I was wrong.
I Googled bunch of examples but it seems they all producing same error “Cannot open gdgraph1.png:Permission denied”.
I could use Excel but want to use Perl.My data table...
It is my first post in the forum. Sorry if I'll do something wrong. I do not see "code" button, so I'll just paste the code here.
Hi,
I have number of files in a directory like this: Cell_01.txt, Cell_02.txt and so on...
Each file has number in a column, something like this:
12
06
1234
45...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.