Questions tagged [script]

An automated series of instructions carried out in a specific order, such as a Windows script created to launch a specific program on startup.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
21 views

Tools required to modify photo date based on its filename [closed]

I have a mix of photos and videos that I exported directly from Nextcloud's data files. These photos are named in a varying format that can be determined via Regex. Grouping these photos by name type ...
Aiden's user avatar
  • 1
0 votes
0 answers
16 views

Insert text in Powershell prompt using control sequence ("chord")

I have a fzf script that lists all branches that satisfy some requirement. It looks like this: function gbr { $b = git branch -a $sel = echo $b | ... some processing ... | fzf echo $sel } ...
Fedja's user avatar
  • 1
0 votes
0 answers
20 views

How can I tell in a script, which AzureAD domain a machine is joined to, and which groups it is in, locally on the machine?

I have existing PowerShell and VBScript scripts to tell me things like which AD domain and forest a machine is joined to, which OU it resides in, which site it considers itself to be in, etc. And I ...
Adam Thompson's user avatar
12 votes
6 answers
9k views

Is there a general purpose scripting language that I can expect to find on (almost) all Windows installations?

I'm deciding on the programming language I want to use for a simple script that will make a HTTP request checking for avaliable updates, download the update if avaliable and execute a program. On ...
Reverent Lapwing's user avatar
1 vote
0 answers
9 views

left hand keyboard toggle

I am designing code for a keyboard to be only used with left hand for a stroke patient in autohotkey. I need to use the space bar as a toggle button. So, when space bar is pushed it changes the output ...
Amy 's user avatar
  • 11
0 votes
1 answer
55 views

Prevent sending a specific key if I'm pressing other 2 or more keys

I have this mouse with additional forward and back buttons at the side and here's an AHK script that I use with it, It's main purpose is: If middle mouse button is scrolled up while holding down ...
ene adelehum's user avatar
1 vote
2 answers
72 views

Command Line to Open specific Outlook 365 Calendars

Questions: How can I open a specific outlook calendar via a command line? How do I find the values to use in the /select switch? Work already done: Using "c:\program files\microsoft office\...
psycoperl's user avatar
0 votes
0 answers
11 views

Google Form validation from a Google Sheet for Inventory [migrated]

I'm trying to make an inventory system and am struggling with using a google form to check out inventory. I would like the form to validate that the products being removed from inventory are actually ...
Lucasheythere's user avatar
0 votes
0 answers
35 views

Automated dismounting & mounting of external hard drive

I have an external hard drive for my backups, but to better protect it against ransomware, I want to have a scheduled script after the backup finishes, that dismounts the drive, and then a similar one ...
pabaxe's user avatar
  • 1
0 votes
1 answer
75 views

AHK keywait for multiple keys (missing (SC) (VK))?

I got this function from here : https://www.reddit.com/r/AutoHotkey/comments/1arcp8q/comment/kr1km61/?context=3 It waits for one or multiple keys to be pressed, But It doesn't accept scan code (SC) or ...
yfjuu 0's user avatar
  • 23
0 votes
1 answer
37 views

how to change the format of the date time of windows from WSH

I want to use Windows Scripting Host to automate my windows instalation and I want from it to change the hour to 24h and the date to YYYY-MM-DD. Is it possible?
Remus Rigo's user avatar
  • 2,999
0 votes
1 answer
57 views

Linux/Ubuntu/Orange Pi5 retrieve open tabs on Chromium (kiosk mode) via terminal - Powershell

I have a problem as of late where I am developing some PowerShell script to manage and update some digital displays. Please see below for my work in progress (By no means done). I am struggling to be ...
M.Atkinson's user avatar
0 votes
0 answers
52 views

PuTTY script reading a list? [duplicate]

Is there a way in PuTTY to run a script that will read a file of names and then answer a prompt of yes (per name)? It is a Red Hat Linux backend server that I am connecting too. At times I can get a ...
johnism's user avatar
1 vote
1 answer
103 views

Writing a batch script to copy files based on date

I have a folder on a local PC that updates files through Dropbox. I have created a batch script that runs through a scheduler each day. So far it checks to see if a folder is empty (C:\TheGlenFTP\...
ChrisH's user avatar
  • 11
1 vote
1 answer
86 views

Windows stop all radios when you go to sleep / hybrid sleep / s3 sleep

I am looking for an automatic way to prevent any Bluetooth and/or WiFi connections during certain times. E.g. while my PC is asleep. Because Microsoft in its infinite wisdom and user servitude, has ...
Spectraljump's user avatar
1 vote
1 answer
64 views

How to get the timestamp for the system lock/unlock of ubuntu 22.04 with the user's inactivity time? (Not login/logout.)

I want to get the user's lock & unlock timestamp in a single script or command, as in "last" command I can see the user's name with system's login & logout timestamp. How can I get ...
Mahesh Garole's user avatar
-2 votes
1 answer
51 views

Improve bat script

I'm try to improving this and make it looks better. I have two issues When I run as administrator the file that I need won't copy in the user profile (I just run as admin to run the .bat script. ...
Daniel Jiménez's user avatar
0 votes
0 answers
32 views

OC document with mixed mathematics and text

I have a document containing math-equations that I want to translate to another language using google translate. What I would have done if it was a text-document with images, is to use any ocr-...
Mikkel Rev's user avatar
0 votes
2 answers
77 views

Some image files are deleted during output/moving with batch file

I've been having an issue for a while now with various versions of a batch file script I have been using to assist with listing items on my WordPress/woocommerce page. The script seems to occasionally ...
MonkeyNoodles's user avatar
0 votes
1 answer
153 views

LDAP manipulation - Powershell or any other langage?

For a synchronization script, I need to connect to a LDAP (not an AD), search for few users then extract their usercertificate. As the rest of the script is already written in PowerShell, I thought it ...
el_grom's user avatar
0 votes
2 answers
625 views

How can I run a bash script in zsh?

I want to run a script written for bash in zsh. If I run which bash, I get /usr/bin/bash Following this answer I have created the following script #!/usr/bin/bash echo 'Hello' The file hello is in ...
Psionman's user avatar
  • 153
0 votes
1 answer
452 views

How do I set Task Scheduler to execute Windows Service at __:00/15/30/45 am/pm from start up?

To be more precise, this is a failsafe that I am trying to create for my windows service. For information, I need my windows service to extract data from a server at 15mins intervals everyday. E.g., ...
Wyap005's user avatar
0 votes
1 answer
100 views

WinSCPSession error in parameter name 'HostName'. How it fix?

I created a script in WindowsPowerShell that sends files from the hard drive to an unsecured FTP server. However, I have an error problem that I don't know how to fix. I have Windows Powershell ...
user3435228's user avatar
0 votes
0 answers
129 views

Add buttons to Windows Explorer to automate tasks

Is there a way to add a custom button to the Windows Explorer GUI so I can automate some tasks in folders, eg. to automatically create a new subfolder with the current date as its name? The button ...
Val's user avatar
  • 131
0 votes
0 answers
43 views

How to skip an rm command without erroring out of the script [duplicate]

My SFTP script errors out if the target file in my "rm xxx" command doesn't exist. Sample script: OPEN sftp://pwd@host cd from_ar rm file1.edi -f rm file2.edi -f rm file3.edi -f rm file4....
JSS's user avatar
  • 1
1 vote
0 answers
57 views

How to select data between hex values from a file

Let my try and rephrase the question. Below is a sample of the file I have, pasted from a hex editor. 0000:0000 | 02 30 1C 31 32 33 1C 49 72 72 65 6C 65 76 61 6E | .0.123.Irrelevan 0000:0010 | 74 ...
Corvus Corax's user avatar
0 votes
0 answers
50 views

Is there an alternative way to install illustrator scripts on Windows?

I have a work computer that is controlled by an admin so I can't copy files into the program folder without calling them. I have tens of scripts to set up and copy into this folder which will require ...
Aasim Azam's user avatar
0 votes
0 answers
96 views

Switch screen being mirrored by command line

In my setup I have two monitors stacked vertically, and a TV, hooked up to my PC. The TV mirrors the top screen usually. I want to write a script (so that I can set a keybind) to switch the screen it ...
Precast Dragon's user avatar
4 votes
3 answers
6k views

Downloading Google Chrome using Powershell

Is it possible to download the latest version of Google Chrome using Powershell. I'm an IT Admin looking at putting a script together for our field techs. Since upgrading our client machines to ...
uberdude's user avatar
0 votes
1 answer
92 views

Find letter of the system drive of most recently attached VHD

There are scripts for finding letter of most recently attached VHD here and here. I use the following code to run from batch script: FOR /f usebackq %%a in (`powershell -c "GET-DISKIMAGE %...
qloq's user avatar
  • 135
2 votes
0 answers
198 views

How can I close a browser window from a bash script?

I would like to open and close windows from a bash script but in my two versions of the code it gets stuck when it opens the first window and does not close the current window and then open the new ...
Bambino 's user avatar
0 votes
0 answers
25 views

How do I install many lines of packages with apt (from a script)? Does '\' work? [duplicate]

A part of my Bash script looks like this: apt install -y alsa-base alsa-utils apt-transport-https build-essential curl ffmpeg geany gcc \ gnome-screenshot gnome-terminal libfuse2 libreoffice-calc ...
John Smith's user avatar
0 votes
1 answer
252 views

mv in script eports "cannot stat"

I'm trying to write a script that adds the last accessed time to the end of the basename. Here is the script: for f in *.doc; do DIR=$(pwd) FILENAME="$f" FILETYPE=${FILENAME##*.} ...
MSS's user avatar
  • 3
2 votes
0 answers
46 views

PowerShell output is saying no

I wrote this PowerShell script to read two big text file based on the following model: ID "Text", the script read both text file and is supposed to compare them and tell me if the line exist ...
Maslie's user avatar
  • 35
1 vote
0 answers
241 views

Creating a script for Windows 11 to gzip some files using 7-zip then move and replace them in another folder

I have the following directory structure: Parent Folder: Project Children of Project: data, rawData Inside of rawData I have: index.html, settings.html, user.html, script.js, style.css and other files....
George Florian's user avatar
3 votes
2 answers
215 views

SSH remote command with nohup not working as expected

I wanted to run a long running command in a remote server, even after the connection terminates. So I thought of using ssh host "nohup cmd &". But for some reason, neither cmd is going ...
Sourav Kannantha B's user avatar
1 vote
1 answer
148 views

How to execute three terminal scripts in three new tabs from Applescript?

I have the following apple script top execute three commands in different terminals. Is it possible to (1) combine this script to make it more efficient and (2) open in different terminal tabs instead ...
Brigadeiro's user avatar
3 votes
2 answers
2k views

Extract text between two strings from a file and save the output

How to extract the text between two strings from a file and save the output to another file, and invoke it in batch, at command line? To be more specific, let us say that the input file is SomeFile....
digital-Ink's user avatar
0 votes
1 answer
1k views

Powershell: Get-StoredCredential not working when script is run from task scheduler

I am writing a powershell script which shall periodically run to backup the contents of a remote folder. That remote folder is mapped as a WebDav share to my Windows drive G:\. This post and this one ...
Traveler's user avatar
  • 326
1 vote
1 answer
112 views

What is the equivalent of Linux's && for windows

What is the equivalent of Linux's && for windows For example cd\ cd rcA powershell "ls | where {$_.Length -lt 100gb} | Remove-Item -Force -Recurse" What to add to make the script ...
God of Money's user avatar
1 vote
1 answer
97 views

When using script for WinSCP it opens another folder

I am trying to automate process of downloading files from SFTP server using WinSCP. But I am having issues with the execution of one part of the code. When the connection is established instead ...
Ivan Aksentijevic's user avatar
0 votes
0 answers
231 views

WINDOWS LOCK SCREEN: Unable to refresh via Commandline

I'm trying to publish a LockScreen company-wide and I was able to achieve it by applying the settings under the registry 'HKLM:\Software\Policies\Microsoft\Windows\Personalization' and it worked as ...
Nana's user avatar
  • 1
0 votes
0 answers
309 views

Autoconnect to UltraVNC machine using password in a script, but the hostname (VNC Server) is always empty

VNC Server Field I'm making an GUI using PowerShell with a listbox and in that listbox there are hostnames. When I select it and hit connect, it should connect to that machine without entering a ...
Sub's user avatar
  • 1
0 votes
1 answer
105 views

Double-clicking .sh file on KDE fails to run the script

I have a simple .sh script on my Desktop that fixes a minor annoyance with my second display. If I open Konsole, and type ./script.sh, it runs perfectly. But if I double click that .sh file - it fails ...
Adrian's user avatar
  • 1
0 votes
0 answers
131 views

Win10 Powershell. Powershell scripts won't run since update to 7

A previous question involved my using Winget to upgrade powershell from 5.1 to 7.x. As I understand it, I now have them side by side. But I have a new issue. I had been experimenting with scripts to ...
pwright2's user avatar
0 votes
1 answer
164 views

Linux RHEL 7 - Shell Script - Can execute command separately but cannot execute inside a script

I have a simple script use to install a package under cust privilege like this (command changed for security) installScript.sh #!/bin/bash patch -i <package-name> << EOF n EOF the purpose ...
TriNguyen's user avatar
0 votes
0 answers
265 views

Overwrite and not merge files when copying folders

I have a root directory C:\ROOT and this directory contains a number of subfolders, with names like these: C:\ROOT\Folder0001 C:\ROOT\Folder0002 C:\ROOT\Folder0003 ... C:\ROOT\Foldernnnn Each ...
Enrico Priotti's user avatar
4 votes
1 answer
62 views

Is PHP actually ported to AmigaOS?

I have long had the thought about what it would be like to have PHP running on an Amiga (I mean a real one), and have tried to search and ask about this. It's ambiguous as to whether or not it really ...
Stan's user avatar
  • 105
0 votes
1 answer
107 views

How to do logging after taking admission access in batch script?

I have typed the suggested solution in Log an entire batch file output. But only work when we batch script doesn't ask for admin access or take any user input. In my script i I'm take the ...
Ashwani Kumar's user avatar
2 votes
0 answers
42 views

Script for launching Firefox with N tabs of specific sites?

I'm an i3 on ArchLinux user, and for my workflow I typically like to launch a specific set of tabs in one Firefox window, in one i3 workspace, and then launch a separate window instance in a separate ...
eriknelson's user avatar

1
2 3 4 5
55