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

learn more… | top users | synonyms (1)

1
vote
1answer
34 views

Do Until in Powershell

I'm connecting via serial port with powershell to a device and I'm trying to change one value until another value gets to 0. I'm using Do-Until but it just runs endlessly with the first value being ...
0
votes
0answers
26 views

Shell script using diff to compare the different files

I have five different files and all are in different directory, I want to check matching files and find out the unique files as well. I am not sure how should I handle this.
0
votes
0answers
34 views

Set specific User's account picture via Batch script

Background: Our company is a small MSP. I have written a script that works well to create our local admin account and set us as a local administrator. That part isn't super important. The main thing ...
1
vote
0answers
64 views

Firefox “do not ask me again” option for unresponsive scripts isn't working - what can I do?

Firefox keeps asking me if I want to stop unresponsive scripts when it encounters them. This happens a lot with my Gmail inbox after it has been left open for some time, however it happens on other ...
1
vote
1answer
16 views

Check hash and then do a certain function

I am trying to check a hash (doesn't matter which), and if a certain hash is met, then run certain commands. Currently my code is if [[ md5sum $file -ne $sum ]] then $commands fi However, ...
0
votes
0answers
82 views

How to run logon script for RDP users

I have a very simple login script ( login.bat ) containing the following line: start chrome I want the logon script to run for any user who logs in via RDP. I've set the script as a so called ...
0
votes
1answer
25 views

Text moves more to the right when looping

This is my output below when creating a function with a for loop inside it: NO Type -- ---- 1 System.Int32 2 System.Int32 3 System.Int32 4 System.Int32 5 ...
0
votes
2answers
24 views

Script Shell Extract String

#! /bin/sh lineversion ="/tmp/g-9.n.gggg1000.fr-worker1.V.2.tar.bz2" My question: how can i extract g-9.n.gggg1000.fr-worker1.V.2 from $lineversion in another variable
0
votes
2answers
17 views

KShell script skips commands when scheduled in cron

I have a Kshell script which executes a java program. /path/to/java -jar jarfile.jar some parameters > log Same line 5 times with different parameters appending output to log file. cat log | mail ...
1
vote
1answer
42 views

Toggle network share on Windows 7

I need help with mounting a samba share with a shortcut/button. I want to be able to mount a share and unmount it with the same button. Here is the pseudo code i had in mind. Requirements are simple: ...
0
votes
1answer
32 views

how to write a shell script to take password automattically after the execution of command

#!/bin/bash cd /var/SUNWdsee/ds6/bin ./dsconf show-repl-agmt-status -e suffix Hostname:389 Above is my script. After the execution of the last line it will prompt for password in screen. I need to ...
-3
votes
1answer
22 views

Clicking link in Chrome without it opening

It seems that many websites nowadays have some code, that when you first open the site and click anywhere on it, it opens a new tab, usually with some kind of advertisement which you manually have to ...
0
votes
0answers
9 views

Parse text from iTunes

I need to find a way to parse some text from an OS X app, specifically iTunes. What I need to do is go to an Application's page and parse the reviews from it. I know there may be better ways, but the ...
0
votes
2answers
40 views

How can I delete rest of the line after a second the same specific character on string?

dagaga2.com:8ddagd1:dbcc:eLXLBdRdd?a'badagahaha dadadagh.com:299515:dgan6hhna:992969199269196 dad2agh.com:299515:dganhna:992969199269196 dadada5uwuwgh.com:299ju515:dgaenhna:9929691998d269196 ...
1
vote
1answer
56 views

Adding date to the name of multiple files in multiple folders

I have a directory which contains 400+ subfolders. In each of this subfolders a new file appears every day. Each new file has the same name as the file that appeared in the same folder yesterday. Each ...
0
votes
0answers
11 views

cronjob not finding commands [duplicate]

I am running (and also new to) OS X El Capitan. I have a user cronjob that is using some basic commands that I got via brew. wget and s3cmd I have the cronjob executing a shel script in my user bin, ...
1
vote
0answers
33 views

inotify does run twice

I wanted to write a script that triggers some code when a file gets changed (meaning the content changes or the file gets overwritten by file with the same name) in a specific directory (or in a ...
0
votes
0answers
65 views

Need help building a shutdown task

I'm running Windows 7 Pro and need help writing a vbscript/wscript that, upon the user trying to shut down the computer, will check a specific directory for .xml files. If files exist, it will run a ...
1
vote
1answer
37 views

Linux - create screen as another user

I'm trying to create a new screen on my server (CentOS 5.11), but instead of starting it with my user, I would prefer to use another user with restricted permissions, just to be on the safe side. So, ...
0
votes
0answers
19 views

need a ping script.sh that checks pingable ip's on lan and stops at last “alive”

I have a bash script on my Debian 8 32 bit that checks what devices are pingable. simple script name"checkip.sh #!/bin/bash fping -g 192.168.1.1 192.168.1.50 The problem is it continues to check ...
0
votes
0answers
22 views

Check which user changed which file with inotifywait

I would like to write a script which uploads a file to ownCloud (through the user that changed the file) if it was changed (written over or changed content) in a specific directory. I figured I would ...
1
vote
2answers
128 views

Script to merge a specific line of multiple .txt files into one .txt file

I have ~800 .txt files. I need extract the name of each file, and one line inside the file, and export it to a new .txt file. The line I need to copy will always start with "System Boot Time:" I'd ...
0
votes
1answer
38 views

restart bash script on exit(1) from php script?

I have a php script that works as long as the internet is on. When problems occur, it exits with code 1. the code in windows looks like this: :start php myScript.php IF %ERRORLEVEL% NEQ 0( ECHO ...
0
votes
1answer
76 views

How to run determine current directory as parameter and pass to script activated from context menu

not sure the title is entirely adequate so let me explain a little clearer. I have an existing powershell script which deletes backups of specific file types. What I want to be able to do is right ...
0
votes
0answers
20 views

Removing “Network Device” which was manually added via script

I have a site on GoDaddy which uses the cpanel software as part of the hosting service. I downloaded their visual basic script to connect to a "Web disk" but now I want it removed. Anyone know how I ...
0
votes
1answer
32 views

Restarting an application upon its closing

I'd like to turn some Windows (7, 8, 10) PCs into indie arcade setups for an event. I really want it to be fool proof. Plugging in controllers and launching a game is easy enough, but games have exit ...
0
votes
0answers
20 views

How to close a program when connecting to a specific wifi on Windows

I have a small download limit on my home wifi. Everytime I open my laptop dropbox starts and starts syncing consuming my download limit. I don't want to remove dropbox from my automatic startup list ...
1
vote
1answer
62 views

How to set one password for all net users in cmd for batch script?

Im writing a windows batch script and I need to set all the users to a certain password? I know that I can do net user to see all users on the computer and I can do net user username password to set ...
0
votes
1answer
73 views

Cant get Windows Script File to close after Telnet

Below is the Current Script I have for my current little project. <job> <script language="VBScript"> Option Explicit On Error Resume Next Dim WshShell set ...
1
vote
1answer
83 views

How do I change the folder this script saves a downloaded video to?

I'm using HotStarLiveStreamer https://github.com/biezom/hotstarsportslivestreamer and I'm having trouble understanding how I can modify the .bat file script to suit my purposes. @ echo off call ...
0
votes
0answers
16 views

Stop bash script with any key

I'm writing a script which I want to stop with any key I choose. After pressing the key, my intention is to complete all my commands at that moment and start su. I've tried adding a & to my ...
0
votes
1answer
162 views

Scripting parallel FTP downloads (multiple connections) on Windows

I need a scripting solution to download several (more then 100) websites by FTP for backup purposes. For each website I want a scripting solution which supports 10 parallel connections to only one ...
0
votes
0answers
72 views

FFmpeg script to convert all WebM files in a folder to Gif, and then delete the WebM files

I'm using FFmpeg with DirectoryMonitor, a folder watching program. When a webm is added to the folder i want to execute a script to convert all webm files in that folder to gif, and then delete those ...
0
votes
1answer
47 views

How to overwrite an echo/printf line with another one? (Making it start at the center of the screen)

I want to write a script which outputs sentences I choose. I want them to appear in the center of the screen: output the first one, and then make the second one appear over the first. Here's my code: ...
0
votes
1answer
20 views

Apple Script: cannot call id3tag from script with “do shell script”

Trying to rename mp3s from an apple script which will be part of a larger script including Audio Hijacker. set folder_p to "/Users/me/Music/" set folder_path to POSIX path of folder_p set file_path ...
0
votes
0answers
21 views

Script in for ffmpeg import-export macro that changes text lines

Was pointed here from video network for the question. I was thinking setting up list of files from folder in excel, all with .mp4. Around 4000 lines in total. Column A - original file name Column ...
1
vote
1answer
133 views

Send E-Mail from Powershell Script to Multiple Recipients based on ActiveDirectory User

I have a script that I would like to dynamically send an email containing some info and go to certain people based on who in the company is running the script thanks to ActiveDirectory. I have ...
0
votes
0answers
50 views

Soft Link/Hard Link Script for OneDrive

My problem is the following: I had redirected all my Users/Documents, /Pictures, /Videos, /Music folders to another Drive, but also merged them with my relocated OneDrive. Everything was fine and all ...
1
vote
2answers
91 views

What is the maximum value of a numeric bash shell variable?

I'm curious as to what happens when a numeric variable in bash is incremented up without purposely stopping it. How large can the number get? Will it overflow and become negative and just continue to ...
0
votes
2answers
43 views

Running a script when I exit a program

I want to identify when a specific program is being shut down, and run a script when it does. Is there a way to do that on Windows? The thing I had in mind is running automated git commit + push ...
0
votes
1answer
22 views

How to manage the same script on many computers at once?

I am a student doing research in multi-agent systems. I have a network of 4 raspberry pi cameras that I am using to do some vision processing and combining the results using some algorithms developed ...
1
vote
1answer
77 views

How to prevent “source” in a bash script from passing the script's arguments?

These questions address the functionality of source: What is the difference between executing a bash script and sourcing a bash script? What does 'source' do? but I'm confused as to why ...
0
votes
0answers
34 views

Batch Delete User Files every 2 Weeks

I need a Batch-Script which delete Private User Files every 2 Weeks. User Files Admin, Public and a Domain-Account "dJas" shouldn't be deleted. This Script crashes Windows @echo off & setlocal ...
0
votes
0answers
12 views

Checking if file exists to launch different programs

I use the following code to check for a file named loaded in the shared folder.This works when the file is placed in the local dir but it does not write the file to the shared folder. What I'm i doing ...
1
vote
1answer
44 views

Prevent open -a Terminal.app from automatically exiting on Mac OS X

On my Mac OSX 10.9 Mavericks, I wrote a small bash script to open a log file for a terminal game application I'm writing so I can see print statements: #!/bin/bash printf '\e[3;0;0t' ...
0
votes
1answer
42 views

Turn each group of multiple lines separated by empty line into one line?

I have a file of many groups of lines, with blank line separating the "groups" of lines. I want to put each group of lines into one line separated by space. input line1 line2 line3 ---blank line- ...
0
votes
0answers
3 views

[Windows]Automatically run script only when application is run? [duplicate]

I have a script generated by FreeFileSync that backs up (via versioning) Firefox's profile directory every hour. How can I have this script run when Firefox is started and terminate when Firefox is ...
1
vote
1answer
122 views

Script to check Computer Model and Download BIOS File

I've just started working with WindowsScripting and would like some help figuring out how to write a Script that would check the model of a Computer and store the result in Variable in the Bat file. ...
0
votes
1answer
35 views

XCOPY with a little twist

not sure if this is asked before but I need to move files from one location to another with a little twist. I have the following script written: @ECHO OFF set source=C:\folder1\folder2 set ...
0
votes
2answers
113 views

How to get HTML file as a content to mail (shell script)

I am new to shell script, I have an HTML file which contains table data. Now I need to send this file to mail. mail -s "test" abc.com <test.html Currently I am getting the raw HTML code for the ...