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)

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
39 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
70 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
38 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
24 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
172 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
42 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
91 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
21 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
73 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
98 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 WshShell=...
1
vote
1answer
95 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
212 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
78 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
54 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
23 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
166 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
56 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
116 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
48 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
101 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
53 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
50 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
147 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
37 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
125 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 ...
1
vote
1answer
38 views

How to launch this particular script from any desktop at any location?

This part seems to be the code to modify: Set fol = fso.GetFolder("c:\TEST") How can I change that so that it works on any computer from any location/path? Would I need to integrate an additional ...
-1
votes
1answer
28 views

How to create a “function” for terminal to run

I have about 10 terminal commands that execute syncing with a Git repository and a live-server. How can I boil that down into single command? Is this a use case for scripting? Steps include: ...
2
votes
1answer
131 views

Powershell script to clean up folders

There's a need to do a weekly cleanup of FTP user account mailboxes on our server and it has about 50 user accounts defined. Below is an example of the FTP user mailbox folder structure which each ...
0
votes
0answers
33 views

Using Github to Store Files for Retrieval via Local Script

I'm trying to find a solution for contracted users who are not on our domain to be able to automatically pull down files that will overwrite local files on their PC via a batch or vbs script that they ...
0
votes
1answer
36 views

How to execute a shell script when system time is changed? [closed]

I want to be able to reliably run a script on system time change. I don't know much shell scripting, so was thinking of touching a file in a continuous loop and figuring out system time change using ...
0
votes
1answer
26 views

AHK replaces Alt+Shift+LMB to Alt+Shift+Ctrl+LMB?

I'm newbie in AHK, but i could compose few scripts to one. This: ` !+LButton:: SendInput {MButton down}{RButton down} Loop { Sleep, 10 GetKeyState, state, LButton, P if state = U ...
3
votes
1answer
201 views

How to compare and filter files in the directory with filename in text file or excel sheet?

I have 100000 mp3 files in one directory, each file contain a random filename , and I have another excel sheet containing the mp3 file's name and to whom it maps to. Is there any way to develop a ...
4
votes
2answers
57 views

for loop…in a for loop…in a for loop?

So I have a bunch of locations I need to check for two possible filenames, however the directory names vary. So here's essentially what I'm trying to optimize: for /r "%ProgramFiles%\WildGames" %%i ...
0
votes
2answers
96 views

sed command returning “sed: bad option in substitution expression”

For example:- I have a file named file.txt $ cat file.txt $key I have a environment variable, for eg: $key in a text file and lets say $key = 1234, so I can replace the value with the below ...
1
vote
0answers
32 views

how to keep the multi-screen configuration even after turning off main monitor?

Currently have 1 laptop and 1 monitor. Before my recent Windows 10 update, I could close my laptop screen and the monitor would still function as the secondary monitor. This was useful, because I can ...
1
vote
1answer
24 views

CGI scripts or other? [closed]

So it is my first time writing scripts. Here is the scenario: On our companies web server there are tools written in javascript that can verify user's accounts, change people passwords, and things ...
0
votes
2answers
1k views

Remove-Item : Cannot bind argument to parameter 'Path' because it is null

Good Afternoon I have created the following powershell function script{ param ( [string]$path = {"C:\PowerShellTest\Med Rec\1\", "C:\PowerShellTest\Med Rec\2\", "C:\PowerShellTest\Med ...
3
votes
1answer
208 views

How do I export favorites from Firefox and Import them in IE11?

I am looking at guidance write a script to export favorites from Firefox and import them in IE. any thoughts?
0
votes
1answer
46 views

Linux script to go into all folders and perform command

Hi I have several folders in my directory. I would like to perform this command in all of them: wc -l * > total Is there a way that a script can do this?
0
votes
0answers
28 views

Group Policy Logoff/Logon

If Exist "\\10.4.1.22\sysvol\corp.ubiquitygs.com\scripts\Logons\%username%.txt" goto notlogon echo %username% logged in from %computername% > \\10.4.1.22\sysvol\corp.ubiquitygs.com\scripts\...