Author Topic: Scripting Language  (Read 674 times)

0 Members and 1 Guest are viewing this topic.

Offline DAVE Z

  • Senior Member
  • **
  • Posts: 83
Scripting Language
« on: February 18, 2019, 04:28:43 PM »
  I nave never written a script but I would like to start  learning. I would like to perform daily task like copying a file from one location to a second location on my PC.Also renaming files. I would like to have it execute at a specific time.  I used to write DOS batch files years ago using DOS commands before windows came out.  (The 80's!)  but nothing since.
     So, what scripting language  should start using? Is there a website or book I can tutor myself on the subject?
         
     

Offline daneast

  • Member
  • *
  • Posts: 48
Re: Scripting Language
« Reply #1 on: February 19, 2019, 11:55:46 AM »
That's an extremely open ended question, especially for this forum (which is specific to weather, and typically server-based scripting languages).  If by "PC" you mean Windows based, then look into Powershell because that is native to Windows: https://docs.microsoft.com/en-us/powershell/

Offline casacota

  • Senior Member
  • **
  • Posts: 77
    • Observatori de Sant Martí de Canals
Re: Scripting Language
« Reply #2 on: February 19, 2019, 04:07:39 PM »
  I nave never written a script but I would like to start  learning. I would like to perform daily task like copying a file from one location to a second location on my PC.Also renaming files. I would like to have it execute at a specific time.  I used to write DOS batch files years ago using DOS commands before windows came out.  (The 80's!)  but nothing since.
     So, what scripting language  should start using? Is there a website or book I can tutor myself on the subject?
         
     

Exactly in the same situation, 20 years ago I did choose Perl. It is not far from DOS but can almost everything, and can be used on any computer or server if it has Perl installed. But yes, it is a very open question!

https://en.wikipedia.org/wiki/Perl
« Last Edit: February 19, 2019, 04:12:03 PM by casacota »

Offline DAVE Z

  • Senior Member
  • **
  • Posts: 83
Re: Scripting Language
« Reply #3 on: February 20, 2019, 03:17:13 PM »
Thanks for the replies. I will try to be more specific. Once a day I would like to copy the current WLK file from my station folder to a folder on a second hard drive on my PC. I have been doing it manually every day using Windows COPY & PASTE. I will have to confirm that I will want to overwrite the file. How do I make this happen automatically?

Offline Cutty Sark Sailor

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3394
    • Frankfort Weather - TwinHollies WeatherCenter
Re: Scripting Language
« Reply #4 on: February 20, 2019, 06:49:38 PM »
Thanks for the replies. I will try to be more specific. Once a day I would like to copy the current WLK file from my station folder to a folder on a second hard drive on my PC. I have been doing it manually every day using Windows COPY & PASTE. I will have to confirm that I will want to overwrite the file. How do I make this happen automatically?
Try this free little jewel from NirSoft:
http://www.nirsoft.net/utils/seqdownload.html
Ii think it will do what you want locally...
 


Offline cjohlandt

  • Senior Member
  • **
  • Posts: 73
    • Cedar Ridge Weather
Re: Scripting Language
« Reply #5 on: February 21, 2019, 12:03:52 AM »
Thanks for the replies. I will try to be more specific. Once a day I would like to copy the current WLK file from my station folder to a folder on a second hard drive on my PC. I have been doing it manually every day using Windows COPY & PASTE. I will have to confirm that I will want to overwrite the file. How do I make this happen automatically?
You can also still use DOS batch commands in Windows, especially for basic things like copying files.  Create your batch file and use the Windows scheduler to have it run at the same time every day.

-Chris

Sent from my Pixel 3 XL using Tapatalk

Davis Vantage Pro2 Plus Wireless, WeatherLink Live
WXM WiFi (identical to Ecowitt WS69), Ecowitt GW2000
PurpleAir PA-II

Offline DAVE Z

  • Senior Member
  • **
  • Posts: 83
Re: Scripting Language
« Reply #6 on: February 22, 2019, 02:47:51 PM »
Thanks guys. That Nirsoft software looks like the ticket for grabbing some images I have tried to get to including my own D-LINK camera.

I will also look into Windows Scheduler.

Offline droiddk

  • Forecaster
  • *****
  • Posts: 334
Re: Scripting Language
« Reply #7 on: February 22, 2019, 02:51:49 PM »
  I nave never written a script but I would like to start  learning. I would like to perform daily task like copying a file from one location to a second location on my PC.Also renaming files. I would like to have it execute at a specific time.  I used to write DOS batch files years ago using DOS commands before windows came out.  (The 80's!)  but nothing since.
     So, what scripting language  should start using? Is there a website or book I can tutor myself on the subject?
         
     

Python will do that nice and easy for you and this book is absolutely perfect for jobs like that
https://automatetheboringstuff.com/

Regards

Offline DAVE Z

  • Senior Member
  • **
  • Posts: 83
Re: Scripting Language
« Reply #8 on: March 01, 2019, 08:17:19 PM »
I tried  using the Nirsoft software. Good stuff. Very flexible.

 

anything