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)

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 ...
6
votes
4answers
8k views

How-to limit Unix FIND results number

Is there a way to limit the number of results returned by the FIND command on an unix system? We are having performance issue due to an unsually large number of files in some directories. I'm tryging ...
5
votes
3answers
2k views

I want to execute the commands in a loop at the same time, not one after another

I'd like to write a loop ('for') that will do some action 'X' number of times. But instead of performing the actions sequentially, one after another, I'd like them to execute simultaneously (in ...
4
votes
3answers
8k views

Windows xp command to search for files

What is the easiest way to search for files from a command line on Windows XP? I want to look for files created since a certain date, bigger than a certain size, or on a certain drive. Ideally I ...
4
votes
4answers
10k views

Delete blank lines from a text file

I am trying to delete all the blank lines in a text file. Is there a quick way to do this? What I have line one line two What I want line one line two I am using Notepad++, so a solution using ...
3
votes
1answer
1k views

grep fails in upstart script

I have an upstart configuration for a service which needs to check the existance of a process on it's startup. This sounds fairly easy but I'm already trying for 3 hours to get this thing solved and ...
3
votes
1answer
321 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
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. ...
2
votes
1answer
1k views

Renaming files according to the folder they're in

I have hundreds of folders named after movies. In each folder there's a .mkv file (or .avi, .mp4), named differently. In each folder there's a folder.jpg. I'd like to rename each video file so that ...
2
votes
2answers
1k views

Remove bash startup behaviour (mac user)

When I start the terminal (which uses bash) a echoed message appears several times right before the message "You have mail." and it is added by someone that has used my computer. It also happens when ...
2
votes
2answers
4k views

FTP script won't transfer remote files to local computer

This is a follow up to FTP BAT file - Windows Scheduled Task. I copied the FTP script, but I can't transfer the files to my local computer. All I get is this (server address omitted): 331 ...
1
vote
1answer
231 views

Open browser window on dual monitors [duplicate]

My client has dual monitors which they use to display two different websites in a public space. They want to be able to hard reboot the system and have it automatically start two browser windows, one ...
1
vote
1answer
7k views

Running remote scripts on Linux Servers from Windows

I'm on a Windows server, I'm looking for a way to run some scripts (through RSH?) remotely on Linux servers. Thing is, I have to do a lot of stuff manually on different servers whenever I want to ...
1
vote
2answers
7k views

Shell script that monitors CPU usage and terminates services with high CPU utilisation

We have a Windows 2003 server where 3 services are running constantly. Sometimes these services consume over 90% CPU. Restarting these services returns normalcy. I need a script/program that will ...
1
vote
1answer
2k views

Is there a way to programatically set the printer properties in Windows?

As a paper saving drive throughout the organization, we plan to set 2 page printing as default setting on all the Windows machines. I would like to contribute to this by writing a small script that ...
0
votes
2answers
110 views

Automate script | Rename a defined list of filename by a defined list of word powershell

All my code: #read list filenames + filter# $listname = Get-ChildItem 'Y:\Users\H\Documents\D\Game Of Throne' -Filter *.bmp #Read list file txt# $line = Get-Content ...
0
votes
1answer
1k views

Automate creation of taskbar shortcuts

I have Windows 8 computers on a domain. I want to create a Group Policy Object to create taskbar shortcuts for users as they move onto different machines. I have created a batch file that will copy ...
0
votes
1answer
159 views

Pause all but x CPU-intensive tasks

I've got about 50 folders of data to process, and I've got a ruby script that processes a folder's files (which folder it processes is based on a .yml configuration file). And a computer with four ...
5
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 ...
5
votes
2answers
12k views

Starting a script on xfce login and logout?

I use xfce4 as my desktop environment, running on a Gentoo box. I want to start the pulseaudio server when I login. In general, how do I get a script to run as soon as I login to xfce, and how do I ...
4
votes
2answers
13k views

How to create multiple folders and name them by reading lines from text file?

I have a plain text file named Export.txt. It contains a list of geographical places, preceeded by a 3 digit number with leading zeros. Example --START OF FILE-- 001 Aberdeen 002 Bellevue 003 Camas ...
4
votes
1answer
519 views

how to copy I/O not just redirect (Windows and Linux)

I have a simple call command call calabash -D sim.xpl >test.txt 2>&1 and this redirects into test.txt, how do I do both redirect into a file and allow it to show up in the prompt? (I ...
3
votes
1answer
3k views

How to burn a cd (files not iso) from the command line in Windows 7

I have used robocopy and a script to copy files from various resources. I now want to have my script automatically burn the files I copied to a cd. I'm looking for a command. I have tried xcopy but I ...
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
1answer
166 views

Pidgin: a me-specific log file?

I'm trying to make a compilation file of all the text sent by me and all the responses that included my name.... What's the best way about scripting this? Is there a plugin like that for pidgin? ...
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
2answers
3k views

How can I get an interface's bandwidth at any given second from the Linux command line?

I am doing a school project in which I want to get the bandwidth of a network interface at any given second, or some other small increment of time. I need this for a Perl script I am working on. ...
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
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 ...
2
votes
1answer
123 views

Creating directory name from file name - strip out non alpha numeric characters and make lower case

I am able to create a directory based on the name of a file. I am running into a wall if the text has spaces or non alpha numeric characters. I would like to strip out those non alpha numeric ...
2
votes
1answer
392 views

Powershell LastWriteTime is incorrect

I am running the following script to create directories based on the first 9 characters in the filenames in the directory and then moving te files into these directories based on their filenames. dir ...
2
votes
1answer
688 views

Copy all files in folder and subfolders to single folder - with duplicate handling

I need to copy all files in a folder and it's subfolders to a single folder, without copying the subfolders. From searching stackexchange, I've found this script: for /f "tokens=*" %a in ('dir /b /s ...
2
votes
3answers
7k views

shortcut for opening cmd.exe at a certain location

How can I create an icon\shortcut to a script that opens cmd.exe command prompt at a certain location on a certain drive under Win7?
2
votes
3answers
976 views

Can I use a bash script as a Service in OS X without having to set it up trough automator?

How can I use a bash script as a Service in OS X without having to set it up trough automator? I'd basically like to write a bash script, save it in ~/Library/Services and then just have it show up ...
2
votes
2answers
1k views

Shell script to rename multiple files from their parent folders name

I have a file structure like this: 00000010 000000001.file1 000000001.file2 00000020 00000003.file1 00000003.file2 00000003.file3 ... So there are folders with 8-digit names containing one ...
2
votes
1answer
2k views

Checking VBScript for syntax errors without actually running the script

I have a script in VBScript. I'm not sure if it contains any syntax errors or other non-runtime errors. Normally I would just run the script, but I don't want the script to actually run because the ...
2
votes
3answers
2k views

how to stop bash from printing alerts?

When killing a process with kill -9 $PID &>/dev/null in a script, a message is still printed to the terminal after the next command terminates. How do you stop this behaviour? For example ...
2
votes
2answers
4k views

Is it possible to access the shell (Darwin) on an iPhone?

In order to write some little script for example.
1
vote
1answer
119 views

Batch script to ping an ip range?

I'm trying to write a batch script (psexec is also an option) to scan a range of IPs 192.168.1.1-255 and as output, would like a csv file, something like this: column A column B ...
1
vote
1answer
39 views

Redirections shell

Can anyone explain the following? :~$ ls macreave.sh fgvdvg > testo 2> testo :~$ cat testo macreave.sh ccess fgvdvg: No such file or directory :~$ ls macreave.sh fgvdvg > testo ...
1
vote
1answer
3k views

FireFox's NoScript equivalent for IE 11 in Windows 8.1

For my IE 11 in Windows 8, I need a tool I can use to disable/enable JavaScripts on various web pages dynamically when I open a web page - something similar to what the NoScript plugin for FireFox ...
1
vote
1answer
1k views

How can I write a script to count files modified within a particular month?

I use a PowerShell command to count ZIP files modified within the past 30-ish days, that goes something like this: (gci "\\servername\sharename\foldername\subfoldername\*.zip" | where ...
1
vote
2answers
5k views

How do I open a random file in a folder, and set that only files with the specified filename extension(s) should be opened?

How do I open a random file in a folder, and set that only files with the specified filename extension(s) should be opened? (While preferably, supporting Unicode filenames too.) I've already looked ...
1
vote
1answer
11k views

Batch file script for Enable & disable the “use automatic Configuration Script”

My intention is to create a .bat file that toggles the check box of "use automatic Configuration Script" in Internet Settings. The following is my script @echo OFF setlocal ENABLEEXTENSIONS set ...
1
vote
1answer
542 views

send keystroke to window under cursor ( prevent focus stealing )

i m playing poker on a couple of pokersites with the help of several ahk scripts to send hotkeys to table (window) under mouse. one pokerroom (carbon poker) though, keeps stealing focus and activates ...
1
vote
1answer
513 views

Simulate pgrep using plain grep

How can I do pgrep -U someUserName using just ps and grep? I.e. not count on pgrep being set in a system?
1
vote
1answer
3k views

outlook automated reply with unread message count

I get hundreds of daily emails and I'm looking to configure an out of office reply for outlook which will inform the recipient that I have X unread emails and that I'll get to theirs as soon as ...
1
vote
0answers
2k views

Macintosh OS X Logout Script

I am working on a project where I need to implement a logout script on some Macintosh computers. I have read the following Create a logoff script/task for Mac OS X article and found that while it is ...
1
vote
3answers
610 views

Scripts shell recording playback

I hope this makes sense. I use 'scripts' to make copies of my ssh sessions for various reasons. When I access the logs via less, etc, I see this: Script started on Mon 12 Sep 2011 08:59:14 AM CDT ...