Share via

Script per controllo directory

Gh Gh 21 Reputation points
2021-02-02T04:23:27.043+00:00

Salve, sono un principiante, non esperto in programmazione. Ho un server Windows 2012 R2 con 15 utenti (ma potrebbero aumentare) i quali usano RDP Ogni utente ha un proprio programma che riceve dati. Questo programma scrive continuamente all'interno della directory "DATA_UT" Per conoscere se il programma sta lavorando, devo entrare su ogni singolo utente e verificare manualmente. Vorrei creare uno script il quale controlli ogni 30 minuti la directory ‘DATA_UT’ di ogni utente e, nel caso che le dimensioni siano rimaste invariate o non siano aumentate di almeno 5MB, scriva un un file \data-ora.txt nella directory C:\Users\user001\AppData\Local\care\DATA_UT\ il file data-ora.txt dovrebbe essere: user001 DATA_UT < 5Mb - Lettura precedente= ....Mb - Lettura attuale = ....Mb - Incremento ....Mb user002 DATA_UT < 5Mb - Lettura precedente= ....Mb - Lettura attuale = ....Mb - Incremento ....Mb user003 DATA_UT < 5Mb - Lettura precedente= ....Mb - Lettura attuale = ....Mb - Incremento ....Mb Ecc.... ecc... Grazie per l'aiuto GH

Developer technologies | VB

2 answers

Sort by: Most helpful
  1. Gh Gh 21 Reputation points
    2021-02-03T07:22:32.427+00:00

    Thanks for your reply
    GH

    Was this answer helpful?

    0 comments No comments

  2. Gh Gh 21 Reputation points
    2021-02-02T08:24:55.88+00:00

    I apologize!

    Hi, I'm a beginner, not an expert in programming.
    I have a Windows 2012 R2 server with 15 users (but could increase) who use RDP
    Each user has its own program that receives data. This program continuously writes in the "DATA_UT" directory of each user.
    To know if the program is working, I have to get on every single user and manually check.
    I would like to create a script which checks every 30 minutes the directory 'DATA_UT' of each user, in the case that its dimensions are unchanged or are not increased by at least 5MB,
    writes 'date ora.txt' files in the directory C:\
    the size of the directory C:\Users\User001\AppData\Local\care\DATA_UT\
    the 'date and ora.txt' file should contain:

    User001 DATA_UT <5Mb - Previous Reading Mb .... = - = Current reading .... Mb - Increase Mb ....
    User002 DATA_UT <5Mb - Previous Reading Mb .... = - = Current reading .... Mb - Increase Mb ....
    User003
    Etc. etc...
    Thanks for your help
    Gh

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.