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
1answer
88 views

How to use gpg --gen-key in a script?

GnuPG is one of these annoying tools that has a non-scriptable command line. I want to run gpg --gen-key in a script, the rest of the process is simple commands. Any one had any luck with this? ...
0
votes
1answer
33 views

How to detect bi-directional link state

I have the following scenario: PC1 (Windows 10 Home) connected to LAN-only network (currently using a dynamic IP address) If I try to use a static IP, the connection will occasionally drop half the ...
0
votes
1answer
30 views

Systemd service successful but did not start script

I created a script that has to start on boot. So for this script I created a systemd service and enabled it in systemctl. The script is creating a folder in /mnt, then mounts a cd to it, copies files, ...
0
votes
1answer
28 views

How to run a script on startup for Old Linux kernel (3.0.0)

I need to run a script on system startup, but the Linux version is very old, so: There is no rc.local. Even when I created it and gave it a command, it was never run. There is no crontab at all. ...
0
votes
2answers
255 views

Batch script to conditionally delete files

Owners of Nokia Lumia 1020 know it can be set to store captured photos at full resolution, but the reduced size photos are also stored. I would like to have a script to automatically delete all the ...
0
votes
1answer
278 views

How can I over-ride Windows10 default DNS Servers to use OpenVPN assigned DNS servers

A problem has arisen with Windows 10 in that it always uses it's local DNS servers (as well as VPN assigned DNS servers) for DNS resolving, which in turn leads to a DNS leakage scenario. Details ...
11
votes
5answers
2k views

How can I create a list of named folders in Windows automatically?

So, I am studying an online course which has hundreds of sub lectures. I need to download the source code for each lecture in a corresponding sub-folder. With over 120 lectures, creating a sub-folder ...
2
votes
4answers
2k views

How can I move files from 2-level folders to 1-level folder

I have a bunch of files stored in a file directory as such root_folder -- folder1 --folder1_2 --bunch of files here -- folder2 --folder2_2 --bunch of files here -- ...
2
votes
1answer
1k views

How can I move files into a folder based on their name?

I have several .pdf and .tex-files in a certain folder "ABC". They all are named by the scheme C01S02_Word.pdf C03S02SS01_Description_random_words.pdf C04S01SS02_More_words.pdf and so forth C in ...
0
votes
1answer
225 views

Cannot control click a button in Autoit scripting

I have been trying to automate a button click using an auto IT script in an application. The window title of the application is EDI867 Tracer and the button I am trying to click is Browse. The ...
1
vote
1answer
377 views

How do I obtain statistics about sent email from Mail.app?

I use the Mail.app in OS X Lion. I would like to determine statistics about all emails sent within a timeframe (in this case, from 2010 to current). In particular, I'd like histograms for emails per ...
32
votes
2answers
42k views

SSH: execute sudo command

I have an interactive shell script, that at one place needs to ssh to another machine (Ubuntu based) and execute something as root (the user should enter his password, but the remote command should ...
0
votes
2answers
411 views

Script to change wallpaper in windows 10 not working

I am trying to get a script to work that will change the default wallpaper for windows 10 because I will be deploying Win10 to all clients. When I run the batch code below, it is not changing the ...
4
votes
3answers
5k views

Simplest way to check for dynamic IP change

What would be the easiest way to find, with a script, if my IP address has changed? Background info: I have a standard home cable modem connexion, and my ISP assigns me a dynamic IP. It changes ...
13
votes
3answers
6k views

How to extract a complete list of extension types within a directory?

Within a directory, and recursively within it's sub-directories, meaning every directory within a directory is processed, how do I compile a complete list of unique extensions within the directory? ...
7
votes
2answers
4k views

Playback random section from multiple videos changing every 5 minutes

I'm setting up the A/V for a holiday party this weekend and have an idea that I'm not sure how to implement. I have a bunch of Christmas movies (Christmas Vacation, A Christmas Story, It's a ...
1
vote
1answer
47 views

Calling bash script recursively with different parameters

I'm trying to write a bash script that counts all the files in the given directory & sub-directories, so I wrote this: #!/bin/bash var=0 if ["$#" == "0"] directory="$(echo pwd)" then ...
1
vote
1answer
23 views

How do I make a word frequncy counter case sensitive using command line interface in Perl?

So I have this Perl Script which is a word frequency counter. But now I have to modify this script and make it case sensitive. So if a user adds -i on the command line, the script should compare in a ...
0
votes
1answer
1k views

Script that runs a command with 'exec' doesnt end until 'Enter' is pressed

We have a KSH script that runs a process using exec and hangs. We want to be able to run it automatically and keep it running in background. We tried this: ./myScript.ksh & However this left ...
11
votes
4answers
63k views

How do I set the desktop background on Windows from a script?

On X Windows I had a cool 'silent-alarm" reminder script that would change my root window (background) color to solid red, just for a few seconds a few moments before changing it back. Is there a way ...
0
votes
2answers
36 views

How to copy all files listed in notepad.txt to a different location

I have a notepad.txt document (file) that contains the file-pathname of several files on my PC.  For example: C:\Users\Foo\Pictures\Photographs\September\P1030944.jpg ...
2
votes
1answer
43 views

Replace a nested LaTeX command with multiple arguments

I'd like to replace the LaTeX command \teilseiten{left col width}{left col text}{right col text} by an nested environment. The problem is, that the second and third argument of \teilseiten contains ...
1
vote
1answer
48 views

Script that launch everytime I type a certain command

So basically each time a user use the command ssh I want to launch a script that fetch the user name and time he typed it with the ipaddress he want to ssh to and send them to the server he is trying ...
89
votes
17answers
24k views

Add directory to $PATH if it's not already there

Has anybody written a bash function to add a directory to $PATH only if it's not already there? I typically add to PATH using something like: export PATH=/usr/local/mysql/bin:$PATH If I construct ...
1
vote
0answers
90 views

Powershell Mouse Moving Script on XP

Add-Type -AssemblyName System.Windows.Forms [System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point(500,100) The above code should move the mouse to a specific position (500,100), ...
0
votes
1answer
24 views

How to choose file based on position in shell ls list?

Say we are using ubuntu's bash and we cd to the folder myFolder. Now, say we use ls in this folder, and we get a list of files: file1 file2 file3 We want to, for the sake of this example, run file2 ...
-1
votes
1answer
45 views

Read configuration file and assagin it into script variables

I need to read a configuration file and assign into script variables and omit commented lines, Sample configuration file: # This is sample configuration file SRV_IP=192.168.1.12 DB_IP=192.168.1.10 ...
7
votes
6answers
9k views

Setting ID3 title tag to be equal to MP3 file name

Has anyone got a bash script that will go through a media library and set the id3 title tag of each MP3 file to be equal to the file's name? I'm open to other automated methods too. It can be a GUI ...
0
votes
1answer
1k views

OSX AppleScript mount SMB Share using the Guest user

How do I mount a SMB share using the guest user? I know how to do it with an AFP share: mount volume "afp://;AUTH=NO%20USER%20AUTHENT@NAS_AB01(AFP)._afpovertcp._tcp.local/Images" How do you do it ...
3
votes
3answers
1k views

script to run sox to combine multiple mono tracks to stereo

I have a folder full of .wav audio files. Some are stereo, most are mono splits. The mono split pairs are all named foo bar track.L.wav and foo bar track.R.wav I can use the command line tool sox ...
0
votes
1answer
59 views

Batch file to copy new files from source to destination

I need a batch file that will copy text files that are generated daily and dropped into the E:\BAP Reports\Director Reports folder to our P:. Since nothing ever gets deleted from the Director Reports ...
0
votes
2answers
107 views

AutoHotKey remap page down to (ctrl + win + left)

How do I remap page down to (ctrl + win + left) for windows 10 desktop switch. and same for page up to (ctrl + win + right)
4
votes
3answers
29k views

copy file from windows to Linux

I am writing one script. it will run one linux machine. its targets includes linux, solaris and windows. I know that i can use scp to copy files between *nix. but how about copying file from windows? ...
0
votes
1answer
88 views

Changing hosts file through script on Windows

I have a PowerShell script that editing local hosts file. But it fails because access is denied. Is there any option to run editing commands as administrator(without runas command), from the script ...
0
votes
0answers
313 views

Set PC to auto shutdown after a certain period of idle time unless programs are downloading

I was trying to create a scheduled task in Windows 10 in order to shutdown the PC automatically after 90 minutes of idle. The problem is that the system shuts down itself even if utorrent is running ...
0
votes
1answer
73 views

AutoHotKey: Pressing two keys simultaneously without repeats

Is there a way to press two keys simultaneously and bind it to a macro key (for example, pressing "s" and "d" simultaneously and then bind it to "a" key) without it having the "s" repeat multiple ...
1
vote
1answer
32 views

using trap to close one program when another is closed

Ok...here's my goal....I use dwm, so normally I have no need for a compositing manager. That being said, there are times when I would like to have it running temporarily. There are times when I want ...
1
vote
2answers
58 views

Powershell: Dir /s - Remove Repeated Folders

Situation: In Powershell, I'm using: $folders = dir -s C:\Users\Name\Downloads\*.ttf | Select Directory foreach ($folder in $folders) { echo $folder } To display folders whose contents ...
2
votes
2answers
58 views

How to get latest version string from a collection of folder where folder name is version string

for folder structure like below RootFolder | |--1.2.3 |--1.2.4 |--2.1.3 ... ... ... Under RootFolder, there are a collection of folders, and they all named with ...
0
votes
3answers
439 views

CMD Line executable of PUTTY calling a script

I have been trying to automate a telnet process using a script of sorts. Whenever I get a hint, it points to PUTTY. I have downloaded PUTTY and the derivatives thereof, (plink.exe) to get my script ...
0
votes
1answer
11 views

Zsh: prepend $(<list.txt) args with a directory

I'm using cp $(<list.txt) new_folder to copy a list of files (filenames in list.txt) to a new folder. As is the files must be in the same folder as list.txt. Is there an easy way to make this work ...
2
votes
1answer
139 views

Batch Script for backup

I need a batch script that will zip up all files in a particular directory and save it to another directory in a YYYY/MM/DD-HH/MM/SS format. I've seen things similar but not sure about this. Thanks! ...
0
votes
1answer
41 views

Why is global variable readable, but not writeable inside a function?

The following powershell script will output A, B, A $x = "A" function scopetest() { Write-Host $x; $x = 'B' Write-Host $x } scopetest Write-Host $x Now the strange part: The first A ...
0
votes
2answers
54 views

BASH string manipulation, syntax errors

I have search though many sites, I cant seem to find my problem, down vote if you must but it wont help me at all ./script: line 1: #!/bin/bash: No such file or directory enter ip >>> : ...
2
votes
1answer
162 views

Find and replace hyperlinks in a PDF

I want to automate the process of finding and replacing hrefs (not the anchor text) in 100's of PDF files in a Windows 8.1 OS. I am happy to convert file formats so long as they can be re-compiled ...
1
vote
1answer
163 views

Mail-inbox shows a mail sent from its own mail-address without having sent it

I just signed up for a seminar on a website I usually can trust. I filled out some information for this, also containing my iCloud-mailadress. I did that on a MBP running OS 10.11 in Safari. After ...
0
votes
0answers
13 views

Projector turn on script

I've been tasked with creating a script which would be able to turn our networked projectors on and off (which can already be turned on and off through the web interface.) The projector model is ...
4
votes
1answer
134 views

Check if there are any empty files in a folder

I have a script that downloads 17 files from a FTP server every time, but sometimes some files weigh "0" for some reasons. So I'm searching for a bash script that checks if there are any files whose ...
-1
votes
1answer
45 views

How to send line by line data using autohotkey?

I am trying to send data line by line using this script f1:: send {65465 546454 54654654 54564654 54654 54654 87987 9825659 8985 5598 87446 78569 12586 114855 58511 } return but it is not working. I ...
0
votes
0answers
31 views

Script (or conf file modification) for putty on windows 7

How can i add a script to putty for windows? I found many links describing the procedure but all them are for Linux. I would like to change the color of the router/device names during ssh. Regards.