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
vote
0answers
14 views

Can't run VBS files in Command prompt

In a beginner coding course that wants us to use command prompt to execute various types of files we created in notepad. I have run JavaScript and Python files, but whenever I try to run a VBS file I ...
0
votes
0answers
18 views

Ping multiple hosts same time, receive all echo's to same terminal

Im trying to write a bash script where I would have hosts file like so: 1.2.3.4 5.6.7.8 and the bash script will ping each ip from this file simultaneously. after that I need to ping each ip from this ...
0
votes
0answers
14 views

Creating automation script to turn on and off keyboard backlight for macos

i want my keyboard backlight to automatically turn on at 7pm and off at 7am, but i couldn't found any options for that in settings of new macos. so i thought creating a automation script might do the ...
0
votes
0answers
64 views

File not found when attempting to run a scheduled task in windows 10

I am attempting to write a powershell script that schedules another powershell script. Here is the code that I currently have: $Action = New-ScheduledTaskAction -Execute 'pwsh.exe' -Argument '-...
0
votes
2answers
41 views

Tar extract a stream of tar files

I've got a binary (lets call it displayFiles) which will get several tar files at once and print the tars to stdout. I then pipe the stdout to tar. This works fine when the binary only downloads a ...
-1
votes
0answers
26 views

rename multiple folders each with a different name that is in excel list

I have a folder with many other folders in it. i would like to use powershell to rename every folder in the parent folder a different namee. i have an excel with a list of names in the order i would ...
0
votes
1answer
38 views

Is there a way to copy Excel data into Word with specific formatting?

I'll spare the details but essentially I want to make a study guide or book for language learning purposes. I was wondering if there was a quick and easy way (or even difficult way lmao) to quickly ...
0
votes
0answers
31 views

Recursive PNGOUT for Optimizing All Images in a Folder with multithread

I'm looking to build a small batch script (for windows 10) that executes the command line of pngout.exe for all PNG files inside a folder. In another discussion I found this command: for /r %f in (*....
0
votes
0answers
16 views

How do convert/parse/extract data from a PGN into a spreadsheet/google sheet/excel file? [duplicate]

So suppose I go to like https://api.chess.com/pub/player/gmwso/games/2020/12 or https://api.chess.com/pub/player/gmwso/games/2020/12/pgn there's gonna be a bunch of stuff like say [UTCDate "2018....
0
votes
1answer
49 views

Live statistics chess960 from chess.com?

Both lichess and chess.com have the feature to play the variant chess960 live. However, only lichess has a graph showing how your live chess960 rating has changed over time. Lichess also shows other ...
0
votes
1answer
44 views

Shell command to delete all files in specific range of folders

I'm working on an upgrade to an application and I need to delete all of the files in several folders so that the the files are regenerated when users login. The file path is Master#(where # is the ...
0
votes
1answer
16 views

unexpected EOF while looking for matching `"' ubuntu 20.04

Can someone help me ??? i don't know where is the problem ?? ./menu.sh: line 268: unexpected EOF while looking for matching `"' ./menu.sh: line 271: syntax error: unexpected end of file ...
0
votes
0answers
26 views

Is it possible to set Chrome as the default browser in Windows via a script?

Each time I log into my work computer, my profile is built / set up and Edge is set as the default browser. I then go into "Default apps" ("Settings" is restricted due to my system ...
0
votes
0answers
10 views

Illustrator maths function for transforming objects

I have never understood how to script despite watching tutorials which often are doing something that isn't really relative to what I want to achieve. I have a formula though which I wish to use to ...
0
votes
0answers
38 views

Script Shell, integer expression expected

I have to write a script that takes one argument (a directory name) If the number of arguments is more or less than one, the script prints an error message containing instructions how to use the ...
0
votes
0answers
24 views

Is it possible to create a Windows group policy in reverse?

Is it possible to create a group policy in "reverse" based upon the current registry state? I do a lot of Windows 10 customizing via registry, preferring this to fishing around in group ...
0
votes
1answer
91 views

powershell string interpolation in Shell.Application

I have a PowerShell script; $filex = Get-ChildItem C:\somewhere\anotherfolder\anotherfolder\lastfolder\ -recurse -Filter *coolfile.exe $ShellExp = New-Object -ComObject Shell.Application $ShellExp....
0
votes
1answer
35 views

Linux | Upload a .tar.gz file to a FTP-Server with encryption enabled and port changed

First forward I gotta say that I'm a scripting noob and just've started to learn Linux. I need your help with the integrated ftp-client on Linux. I want to write a script that automaticly packs a ...
1
vote
0answers
11 views

File Management and sync by proxy, via file catalog?

I want to organize files/folders of my external hard drives when the drives are offline, and then sync the changes manually when I plugin a hard drive. Situation: I have lots of files to organize, on ...
0
votes
1answer
20 views

Using wildcards to do mass copying to slightly different names

I want to copy many files inside a single directory. An example filename starts with error042021.mysite and I want the new name end with -dev.co.at.txt. I think I need a wildcard for the number, ...
0
votes
1answer
21 views

Schedule zsh scripts so it will remind me something need to be updated?

I'm using MacOSX, and the Terminal.app is now all using zsh as default shell. I use Homebrew to manage all kinds of packages/application installation, while every day I will have to open the terminal ...
1
vote
2answers
59 views

How to run a PowerShell script with elevated Access using Task Scheduler

I have a PowerShell script that I want to use to close applications running in a different users session. The script works when ran as an administrator, however I don't want to give the users admin ...
1
vote
2answers
44 views

Why does the Windows Batch script output the variable as “ECHO is off.” instead of the actual value

I have written a Windows batch script to create an array and tried to print every element of the array. However, the output is ECHO is off. instead of the actual value such as "Apple". When ...
0
votes
1answer
27 views

Trying to run app in another directory

We have a app that is run out of a specific directory, it uses flask (never worked with it before) and it is called from /home/automation_admin/rest-auto/production/TestLauncherApp Once in that ...
0
votes
0answers
18 views

FreeBSD execute shell fron php to start and stop services

I need your help in this one. I currently have a freenas system that uses freebsd. I am trying to create a simple webpage as html+php+sh or php+sh. Goal is to put a button for every service I have in ...
0
votes
0answers
14 views

Send e-mail as non-existent user for domain

Sorry I didn't know how to really word this in a short title, it's not just a simple send-as question lol. I own a domain that I use as a catchall so that someone can send anything@mydomain.com and it ...
0
votes
2answers
33 views

Change strings in commands to another strings in a smarter way

I know that: $ command -[options] string string2 Can be easily changed with: $ ^string^string3 To obtain: $ command -[options] string3 string2 What else can I do with it, like I'm trying to make ...
1
vote
1answer
71 views

FFmpeg command runs In Terminal, but not in script with TMux

The first time I ran the FFmpeg command I got error: “Output file #0 does not contain any stream” …but I could see the Tux session and connect to it. Then added the full path to the FFmpeg ...
0
votes
2answers
18 views

Reboot Script / boot device

Is it possible to write a script to force a pc to reboot to the boot device selection mode? I did some research into this and always come up with ways to either boot a pc into the device selection ...
0
votes
0answers
22 views

Use shell script to select created files in Finder?

I've found all kinds of results on how to do stuff with selected files in script. But I have a script set up as a service via Automator that already works to create symbolic links for selected files. ...
0
votes
1answer
152 views

How can I convert my Bash script output to JSON and save it as “.json” file?

Here is my script: Get System info #!/bin/bash readarray -t array <<< "$(df -h)" var=$(echo "${array[1]}"| grep -aob '%' | grep -oE '[0-9]+') echo "${array[3]:$var-...
0
votes
1answer
20 views

VPN Email Alert by IP address (Bash Script)

I have an OpenVPN server, when a user connects to the server they are given an IP from 192.168.1.20-25. I want to get an alert when these IP's reply back as well as when they disconnect. So far I can ...
1
vote
2answers
62 views

Inside cmd batch script recursive for loop, get matched files path relative to script file

I am trying to achieve this by substracting %~dp0 from %%~dpa, where %%a is the for loop variable. If anyone is aware of a better way to do this, please advise. My code is as follows: @echo off ...
0
votes
0answers
27 views

vbs printing script problems

Hi all i got some problems with this vbs script set shApp = CreateObject("shell.application") currentPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".&...
1
vote
1answer
17 views

Script for Automator on Mac OS X to limit MacBook mic sensitivity

It is possible to use Automator from Mac OS X to limit the maximum sensitivity of the microphone of the computer? For example, if my headphone change it automatically to 100% it automatically put the ...
1
vote
1answer
66 views

Script for edit PC name

I know that the PowerShell command for rename a PC is Rename-Computer -NewName "LAPTOP-*******" -Force I need a script that replace "DESKTOP" with "LAPTOP" and leave the ...
0
votes
0answers
46 views

In terraform, how to pass variable to custom data script in Azure?

I am planning to build my infra using Terraform and Azure. I need to call script (custom data) to run few task at provisioning time to make server ready to use. How will I be able to send parameter to ...
1
vote
1answer
28 views

FORFILES in batch to delete specific suffix files older than a week

I want to use FORFILES in batch to delete ONLY txt(beginning with localhost_access_log) files (not subdirectories) older than a week. But I am getting %%t was unexpected at this time. for %%t in (.txt)...
2
votes
2answers
98 views

Powershell script via GPO on Logon not working correctly

I made a Powershell script to remove the Windows Store and Cortana on Windows 10. I made and tested the Script successfully. Now i added the script to the LogonScripts on a GPO and tested the Script ...
1
vote
0answers
37 views

How do I remotely modify a Windows 10 hosts file? [closed]

I have a general email issue, with the solution being to edit the hosts file through notepad, however I was wondering if there is a way to patch the hosts file remotely, changing an IP within it?
0
votes
1answer
51 views

Remove-AppxPackage and Remove-AppxProvisioned script not working properly with custom messages

I've built a de-bloating script for Windows 10 whereby I have placed an entire list off apps into a array which then run through a loop until each app is removed. Sadly I can't get my try catch to ...
0
votes
0answers
14 views

Can a media file redirect to a website when clicked?

Can a file open a website when clicked on it? I want the file (eg- any media file) not to open directly, but to redirect to a personal website first for further viewing.I have considered converting ...
0
votes
0answers
43 views

Redirect script to overcome Excel hyperlinks to secure website requiring login

I have found the same problem problem but I couldn't understand the solution HERE I have a combined hyperlink in excel which results in: https://www.website.co.uk/admin/urn-verification/491-492 The ...
0
votes
2answers
54 views

How would I make a script that takes my clipboard and uses it as a variable in a web link [closed]

I have a task at work where I have to go to an Excel sheet and copy the a bunch of asset IDs from a column 1 by 1 and input that in to an intranet site to get the details of the asset. The web link ...
-1
votes
1answer
47 views

PowerShell copy only files with numbers in their name

I want to copy files from a path to a destination. The files i want to copy only contain numbers in their name and always have a specific structure like "xxxx_xxxxxx.upd". Sadly there are ...
0
votes
1answer
79 views

Filtering PowerShell Query Output

I'm searching for a way to filter the output of a query in PowerShell on Windows 10. The output of this command query user /server:$SERVER is currently PS C:\Users\Station> query user /server:$...
0
votes
0answers
25 views

How do I remove a app using its name with powershell?

I'm trying to write a script that can remove apps using the DisplayName from this piece of code Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object ...
0
votes
0answers
46 views

network configuration on debian 10.8

Ive installed a fresh debian buster on a local pc, at home with dynamic IP, static DHCP allocation from router to 192.168.1.190, port forwarding to 192.168.1.190 port 22,80,8080, router IP is 192.168....
0
votes
1answer
65 views

Windows 10 20H2 Powershell job not executing during deployment task sequence

My SOE builds have included a script to get rid of all but a few of the user based apps. The script has worked perfectly in all my builds up until Windows10 20H2. If I log into the workstation once ...
0
votes
0answers
21 views

Search file extension on a windows pc .r2c and Send it automatically to an email address using a bat file?

I found this very useful script for me, but i am missing a search function for a file extension ".r2d" on the D Drive. Any idea how to include it? to search for files with .r2d ending and ...

1
2 3 4 5
50