Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Filer and sort files by modification time in a directory
Post: RE: Filer and sort files by modification time in a...
Thank you all for sharing the codes and coaching! You guys(girls?) are great! |
|
tester_V |
General Coding Help |
6 |
157 |
Yesterday, 05:39 PM |
|
|
Thread: Filer and sort files by modification time in a directory
Post: RE: Filer and sort files by modification time in a...
I would not lie, I Googled it and I do not understand it. I actually come up with a "readable' one and it works.
I'm not sure if it is a good code or not. Sorry about that!
lst_ogs = []
for item in P... |
|
tester_V |
General Coding Help |
6 |
157 |
Yesterday, 06:02 AM |
|
|
Thread: Filer and sort files by modification time in a directory
Post: Filer and sort files by modification time in a dir...
Greetings!
I need to filter files by file names, sort by the last modification time and process them.
I got this code but it does not work.
import glob, os
pt = "C:/PS_Power-Shell_scripts/Files/File.*... |
|
tester_V |
General Coding Help |
6 |
157 |
Yesterday, 03:57 AM |
|
|
Thread: Failing to connect by 'net use'
Post: RE: Failing to connect by 'net use'
My bad! **wink**
I missed little space:
before:
"net use {drl}:\\\\{e_ip}\\c$ /u:someuser somepassword"
after:
"net use"+" "+drl+":"+" \\\\"+e_ip+"\\c$ /u:someuser somepassword" I'm OK now.
Thank yo... |
|
tester_V |
General Coding Help |
1 |
195 |
Apr-20-2024, 06:31 AM |
|
|
Thread: Failing to connect by 'net use'
Post: Failing to connect by 'net use'
Greetings to those that still up at this time! **wink**
I'm failing to map network shares.
I'm identifying "letters not in use" for a share to mount and use it as a variable
and using a list of IPs... |
|
tester_V |
General Coding Help |
1 |
195 |
Apr-20-2024, 05:34 AM |
|
|
Thread: Hide CMD call window
Post: RE: Hide CMD call window
it works, no pop ups! **biggrin**
deanhystad, you are DA MAN! **wink**
Thank you! |
|
tester_V |
General Coding Help |
8 |
366 |
Apr-16-2024, 08:10 PM |
|
|
Thread: Hide CMD call window
Post: RE: Hide CMD call window
I was happy too early **cry**
it still pops up.
I'm not sure how to incorporate "Dead_YEY" snippet correctly to the code I have.
I tried to modify it but it does not work:
import subprocess
from subp... |
|
tester_V |
General Coding Help |
8 |
366 |
Apr-16-2024, 06:30 PM |
|
|
Thread: Hide CMD call window
Post: RE: Hide CMD call window
Yes, DOS window was popping up very hour, I understand it was running " arp -a".
Outstanding! It is what I wanted/needed.
You guys (girls?) are great!
Thank you! |
|
tester_V |
General Coding Help |
8 |
366 |
Apr-16-2024, 05:46 PM |
|
|
Thread: Hide CMD call window
Post: Hide CMD call window
Greetings!
Running my script every hour on a windows machine.
The script has a “arp-a” cmd call and a window pops up that is very annoying **angry** .
How I can suppress the pop up window?
code:
wit... |
|
tester_V |
General Coding Help |
8 |
366 |
Apr-15-2024, 07:45 PM |
|
|
Thread: If a set element has digits in the element
Post: RE: If a set element has digits in the element
I don't know what is wrong with me...
Sorry for taking your time!
I fixed it.
import re
if len(vid_set) > 1 :
for e_vid in vid_set :
if re.findall(r'\d+',e_vid) :
print(e_v... |
|
tester_V |
General Coding Help |
3 |
356 |
Mar-25-2024, 05:10 AM |
|
|
Thread: If a set element has digits in the element
Post: If a set element has digits in the element
Good evening!
I'm trying to find if an element of a set has a digit/digits as a part of an element.
I'm using ".isdigit" but it does not work...
I have to test the set if it has just one element or it... |
|
tester_V |
General Coding Help |
3 |
356 |
Mar-25-2024, 04:34 AM |
|
|
Thread: using PowerShell from Python script for mounting shares
Post: RE: using PowerShell from Python script for mounti...
DeaD_EyE!
That is an amazing way, for me, how one could do that.
Thank you for sharing!
tester_V |
|
tester_V |
General Coding Help |
8 |
570 |
Mar-12-2024, 06:26 PM |
|
|
Thread: using PowerShell from Python script for mounting shares
Post: RE: using PowerShell from Python script for mounti...
Whatever you think is a good idea, it is a good idea for me too man! **dance**
Thank you again. |
|
tester_V |
General Coding Help |
8 |
570 |
Mar-11-2024, 02:39 AM |
|
|
Thread: using PowerShell from Python script for mounting shares
Post: RE: using PowerShell from Python script for mounti...
Like this will do, right?
try :
call(r"net use Z: /delete /yes")
ln1= f'$net = new-object -ComObject WScript.Network'
ln2= f'$net.MapNetworkDrive("Z:", "\\{host_name}\c$", $false, "domain... |
|
tester_V |
General Coding Help |
8 |
570 |
Mar-10-2024, 05:21 AM |
|
|
Thread: using PowerShell from Python script for mounting shares
Post: RE: using PowerShell from Python script for mounti...
I thought when I open the file with "with open..." it closes automatically...
Should I use instead of it :
#with open('C:/Scripts/somescript/Connect-0.ps1','w') as ps :
ps = open('C:/Scripts/s... |
|
tester_V |
General Coding Help |
8 |
570 |
Mar-10-2024, 04:08 AM |
|
|
Thread: using PowerShell from Python script for mounting shares
Post: using PowerShell from Python script for mounting s...
Greetings to you all!
I have a list of Hosts, I need to connect to each host and do something with the files on it.
For some reason some of the hosts refusing connection **angry** , but I can mount it... |
|
tester_V |
General Coding Help |
8 |
570 |
Mar-09-2024, 07:11 AM |
|
|
Thread: Matching string from a file
Post: RE: Matching string from a file
You guys are great! That is what I looking for..get some code and the explanation... **smile** |
|
tester_V |
General Coding Help |
5 |
478 |
Mar-05-2024, 01:31 AM |
|
|
Thread: Matching string from a file
Post: Matching string from a file
Greetings!
I’d like to match strings in files, it seems simple but I’m failing to do this…
It has multiple white spaces before the word Start Time or End Time and the Time and Date of the event
String... |
|
tester_V |
General Coding Help |
5 |
478 |
Mar-04-2024, 09:07 PM |
|
|
Thread: Re Try loop for "net use..." failures
Post: RE: Re Try loop for "net use..." failures
My bad again! **wink** I missed this part:
from subprocess import check_call, CalledProcessError |
|
tester_V |
General Coding Help |
10 |
664 |
Mar-02-2024, 08:15 AM |
|
|
Thread: Re Try loop for "net use..." failures
Post: RE: Re Try loop for "net use..." failures
Gribouillis, thank you for the snipped, but it produces errors:
line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['net', 'use', 'Z:', '/dele... |
|
tester_V |
General Coding Help |
10 |
664 |
Mar-02-2024, 07:50 AM |