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)

4
votes
3answers
207 views

Delete all files in folder except those with certain prefix

I have a folder being filled with auto generated files by an application. There are csv and png extensions being created and stored in there. We need to delete all files in the folder except certain ...
4
votes
1answer
2k views

Unlock PC with Windows Task Scheduler

I need to set up a Scheduled Task to unlock Windows 7 PC at specific time. And second Task, to lock at other specific time. Is this possible by cmd.exe command, or I need to use some third party ...
4
votes
1answer
230 views

How can I automate some simple steps within the GIMP?

I'm trying to use GIMP to automate 3 actions upon a user defined selection in the currently active image - Grow selection by 2 Add border to selection (width of 2, with feathered edges) Fill the ...
4
votes
1answer
3k views

How to call a cmd on a remote server without having the absolute path

I would like to call a cmd (let's call it x.cmd) on a remote server. The x.cmd will return a log file in a log folder. Problem is this log folder in x.cmd doesn't have an absolute path (just a ...
4
votes
3answers
4k views

Howto start an interactive script at ubuntu startup?

Based on Ubuntu core 12.04, I have prepared a bootable DVD. After booting (to console only), I can login as a user and start a script for installation of an embedded device: sudo install_script In ...
4
votes
1answer
87 views

Quick way to find out how much silence is at the start of an MP3?

What's a quick and easy way to find out how much silence is at the start of an MP3? I know there's a lot that goes into that... I don't need anything too precise. Within 50 or so milliseconds is ...
4
votes
1answer
3k views

Shell script - bad interpreter: Operation not permitted

I put the below script in a file called "volume", and put that file in a folder within $PATH. I can execute it fine by "bash thatpath/volume 10" but when I try to execute it using just "volume 10" ...
4
votes
0answers
491 views

VPN on-connection scripting

I use a VPN to connect to the office from home. I use Windows XP's built-in VPN support for this. Due to some unfortunate subnet choices, I must run a script to set up some network routes every time ...
4
votes
0answers
830 views

Python and Google Sketchup

Is there any way of scripting Google Sketchup using Python rather than Ruby? I have had a look at SuPy but unforturnately I'm working with Python 2.6 rather than Python 2.5 which SuPy appears to ...
3
votes
6answers
48k views

How to manually stop a Python script that runs continuously on linux

I have a Python script that is running and continuously dumping errors into a log file. I want to edit the script and run it again, but don't know how to stop the script. I'm currently logged on ...
3
votes
3answers
4k views

Is there a way to run Javascript without a browser, like a shell or batch script?

Is there a way one could run Javascript the way Python, Bash, Windows Batch or other scripting languages are run? File access and other library functions would be nice but are not required - I'm just ...
3
votes
5answers
1k views

How do I flip the line orders of a document with 500+ lines?

Line 1 Line 2 Line 3 Line 4 Line 5 should become Line 5 Line 4 Line 3 Line 2 Line 1 I need a notepad script to do this.
3
votes
6answers
680 views

Physical button to run scripts on a Windows machine

I frequently come in contact with people who absolutely cannot operate a PC, no matter how much training they get. I need some sort of programmable physical button or remote control that executes a ...
3
votes
4answers
18k views

Verify that a cron job has completed

Is there a command that can be run to verify that a users cron job has run successfully? Platform is Ubuntu 8.04 LTS. I have scripts in /home/useraccount/bin/ running crontab -l while logged ...
3
votes
4answers
3k views

In linux how do I to get ' quote ` back-tic through the shell into sed.

In linux how do I to get the ascii decimal/hex/oct code from a char or a ascii char from a decimal/hex/oct code. I see from the gnu sed user manual that I can use the \d# \o# \x# to specify a ...
3
votes
4answers
9k views

Downloading a RAR file from Mediafire using WGET

Example: http://www.mediafire.com/?tjmjrmtuyco This was what I tried... wget -A rar [-r [-l 1]] <mediafireurl> That is to say, I tried with and without the recursive option. It ends up ...
3
votes
7answers
3k views

UNIX find dirs that contain a particular file (pom.xml) then execute command in that dir

I want to, from a root dir, find all dirs that contain a certain file name (pom.xml), then cd to that dir and execute a command. I can do this in a script but I was hoping to do this with a single ...
3
votes
3answers
708 views

How to execute a second condition if the first condition is true in Linux shell scripting

I have an if condition. If that condition is true then one script will be run and after that I need to check another condition. How can I do that using an if statement or something else? For ...
3
votes
3answers
717 views

difference between ${} and $() in shell script

$ echo $(date) Thu Jul 2 16:33:11 SGT 2015 $ echo ${date} $ name=foo $ echo $(name) ksh: name: not found $ echo ${name} foo Seems like ${variable} is the same as $variable. while $() is to ...
3
votes
2answers
5k views

Is it possible to autocrop black borders of a video with ffmpeg?

I think it has a "blackness" video filter, which can determine if a picture sequence is black. Maybe it also has a filter to determine crop values automatically to remove black borders form edges of a ...
3
votes
2answers
138 views

Very Simple Script to Remove Last 5 Lines of a Series of Text Files

For some reason this script outputs three files for each original, rather than one. Must have made some trivial error - I'm new to this! Much obliged if anyone could explain why this happens. ...
3
votes
4answers
2k views

Change shortcut targets in bulk?

I have hundreds of shortcuts to websites where the target looks like this: C:\Users\Herb\AppData\Local\Google\Chrome\Application\chrome.exe www.somesite.com/foo I just upgraded to Windows 8, and ...
3
votes
2answers
2k views

Bash prefix string with tilde to expand to home directory

I can't figure out how to prefix a string (e.g. "user1") with a tilde (~) to produce ~user1 and have that expand to user1's home directory. Here is what I have now: USER="user1" ls ~${USER} ls: ...
3
votes
4answers
2k views

sudo displays typed password in bash script

I have a bash script that uses sudo a few times. There's a couple of strange points about it though. It asks me for my password a few seconds after I've already entered it for a previous command. ...
3
votes
4answers
562 views

On Linux or Windows, how do I find the path for all mp3s that are the only mp3 in that directory?

I have a Music folder and the contents look like this: Music     -ArtistA ...
3
votes
2answers
34k views

Automate file upload in Filezilla using script [duplicate]

D:\Program Files\FileZilla FTP Client\filezilla.exe -c 0/GG/DG/ -a "K:\YY\XXXXX\AAAA\BB\idS.txt" This code doesn't work as it says "PATH NOT FOUND" K:\YY\XXXXX\AAAA\BB\idS.txt However D:\Program ...
3
votes
2answers
5k views

Replacing /bin/bash with /bin/false in /etc/passwd file

I am writing a program to disable users from a system, i want to replace /bin/bash to /bin/false. Example xxx:x:1:22:xx:/export/home/xx:**/bin/bash** replace to ...
3
votes
4answers
9k views

Accessing a remote mounted directory from Windows CMD.EXE

I have a remote directory that is shared and mounted to my localhost. I know the remote directory is mounted and shared correctly as I can read, write, execute the file during a normal mouse and click ...
3
votes
5answers
2k views

How to run a bash script outside of a terminal?

Hey All, wrote this script to confuse my girlfriend when she is using my computer. The only trouble is that if the terminal gets closed the script stops to execute. It currently executes in the ...
3
votes
5answers
18k views

How to use crontab to run a script as nobody

This is on a CentOS machine. I'm trying to run a script as user nobody (or as a user with minimal permissions) at a certain time every day. Here is nobody: [root@CentOS % ~] grep "^nobody" ...
3
votes
2answers
4k views

Run A Script When Connected To A Wireless Network In Linux

Is it possible to have a script run when I connect to a wireless network? My university hijacks all HTTP(S) connections when you first connect to force you to log in with your university account. ...
3
votes
2answers
13k views

Powershell script to list scheduled tasks on remote systems

I want to write a PowerShell script that lists all Scheduled Tasks on remote systems, and includes the user account which will be used to run each task. The local system is running Windows 7, with ...
3
votes
3answers
5k views

Run python script from Finder rather than edit?

Max OS X. When I double-click on a python script it opens in the default editor. How might I make it so that when I double-click, or choose the script from Applications, it executes from the python ...
3
votes
3answers
5k views

Firefox plugin to block scripts of only specified websites

I'm looking for a Firefox plugin that blocks JavaScript from specified URLs. Example: I add: "google-analytics.com" It then blocks all scripts coming from Google Analytics. Essentially a ...
3
votes
1answer
10k views

How can a PowerShell script be automatically run on startup?

I have a PowerShell script to monitor an image folder. I need it to run automatically on startup. I tried to use MSConfig, but I could not find it in that list. How can I have the script ...
3
votes
2answers
1k views

Change the OSX system language in a script

Manually I just go into the system preferences, change the language ordering, and restart my app so it starts up in the default system language. Then I can run automated tests with the app running in ...
3
votes
1answer
4k views

Append to start of filename

I'm trying to add the word [Replay] to all mp3 files in a folder using a batch file like so: @echo off for %a in (c:\folder\*.mp3) do ren %a [Replay]%a But it wont rename the files. all the ...
3
votes
2answers
2k views

Set one homepage for all browsers simultaneously

For testing purposes, I would like to set the homepage of all browsers installed on my computer — Internet Explorer, Chrome, Firefox and Safari — to the same page. I'd like to do this all ...
3
votes
3answers
4k views

How can I take hundreds of smaller images and create one big tiled image?

I have 251 images that are 128x128 in size; I need to create one big image that includes them all tiled together. The image will be 32128x32128 in size if all goes well (Paint.NET says it will be ...
3
votes
3answers
28k views

How do you update an Excel file (Data Refresh and update formulas) WITHOUT opening the file?

I have an Excel file that want to update and save automatically with out having to open it or manually interact with. Manually, I open the file up and hit data refresh which goes and does a SQL query ...
3
votes
1answer
322 views

Force a bash script to run to completion where some items may stick

I've a Uni assignment I'm building that I need to run multiple times with multiple different parameters to check run times. At the moment I've a simple bash script that looks a little like the below - ...
3
votes
1answer
5k views

In TextWrangler for Mac OS X, how to change the selected text to lowercase using a keyboard shortcut?

I know how to use the menu to change case, but I want it to be a keyboard shortcut. Other text editor have this feature but I would prefer to stick with TextWrangler. Does one already exist or is ...
3
votes
1answer
1k views

Split window programmatically with iTerm?

on my development workstation I often have to start the same commands every morning. zeus start, zeus server (booting rails via zeus), redis-server, and like 3 others. I know a lot of people would ...
3
votes
2answers
895 views

Why is my bash script not receiving the exit code from umount?

This is my first time attempting to write a long bash script to manage a server I run, and when using "set -ex" the script exits when umount fails. I thought my if statement would catch it but the ...
3
votes
1answer
5k views

I want to create an AutoHotKey script that waits for a window and sends some keystrokes to it, but the keystrokes are repeating by default

I want an AutoHotKey script that waits for a particular window and then sends keystrokes to that window. However, since the waiting is done in a loop, the keys are sent again and again. Let's say I ...
3
votes
3answers
8k views

WinSCP putting multiple files on SFTP site

With WinSCP 5.2 I wanted to put multiple files with a file extension .pgp on an SFTP site. When I tested my original command line (see below) and it only placed the first *.pgp alphabetical file ...
3
votes
2answers
2k views

Clear the TEMP folder on shutdown

I am following some instructions in More Ways To Speed Up Windows XP to help speed up my computer. One of those was to delete the temp folder on shutdown. Yet after I shutdown and then boot up, the ...
3
votes
1answer
18k views

Change NIC speed/duplex settings in script?

I have a laptop running Windows Server 2003 SP2, with PowerShell installed. Occasionally, this system has to be used in environments where it needs the NIC manually set to 100 Mbps/Full Duplex in ...
3
votes
1answer
3k views

Is there a way to make AutoHotKey select text?

I've seen a lot of info (here & elsewhere) about things you can get AutoHotKey to do with text once the user has selected it, but is there a way to have an AHK script select the text itself? I'm ...
3
votes
4answers
3k views

Mount a share on a Mac using a login hook

I have a script that mounts a Samba share to a folder on the desktop, it runs no problem but when its setup as a LoginHook it doesn't mount the folder. Does anyone have a working login hook that ...