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
23 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
143 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
37 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
64 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
57 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
166 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
43 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
154 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
30 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
141 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
35 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
225 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
105 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
222 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\...
1
vote
2answers
115 views

How to batch “find-n-replace”in doc-files?

I have multiple .doc files with the following structure: [useless text #1] [useful text] [useless text #2] Blocks of useless text are the same across files. How do I batch-delete these useless ...
1
vote
0answers
66 views

Check status of “File and Printer Sharing” with script

I am attempting to write scripts that test that status of important settings on my Windows 7 or Windows 10 PC's. Turning the "File And Printer Sharing" setting OFF/ON is well-documented. But is there ...
-1
votes
1answer
36 views

Linux Bash Script - Sort Sequential Files to Sequential Folders

I have a sequence of 1000s of files named as follows: file01-01-01, file01-01-02 etc. file01-02-01, file01-02-02 etc. file02-01-01, file02-02-02 etc. I would like to sort the files into folder ...
0
votes
1answer
68 views

Windows Batch to automatically unmap Network Drive on Wifi?

I have number of network drives for work. When I work from home, my computer is very slow due to these network drives trying to connect. Does anyone know of a script, which will automatically unmap ...
1
vote
1answer
268 views

Is it possible to automate Notepad++, specifically the search and replace across files?

Is it possible to automate Notepad++, specifically the search and replace across files? I want to be able to automate the search and replacement of placeholder values across a number of file types, e....
0
votes
1answer
111 views

Executing cmd script remotely on Windows

I am using Airytec Switch Off which creates a server on Windows that accepts commands on a specified network port and executes scripts remotely. Turning off/restarting PC works fine. Then I created ...
0
votes
0answers
26 views

How can I disable/enable multiple hardware components with a single command?

I am a web developer/designer during the day, but at night I play DJ gigs. For music, I need several hardware components disabled. Then, after the gig, I reenable all of the hardware. Each of these ...
0
votes
0answers
29 views

Login a generic user via PowerShell

I would like to write a script, which has the purpose to login a generic user to a remote computer. I would like to do this via PowerShell and without any external tools, except any of the ...
1
vote
1answer
229 views

Can a greasemonkey script know what's been loaded into another tab?

I'm planning to write a Greasemonkey script that will run on a particular URL (@include or @match), but, I'd like to have it so that if I open up one or more additional tabs with the same URL, the ...
0
votes
0answers
52 views

Powershell possible to give input to underlying script

I am sorry I could not think of a better title. My problem is I have a PowerShell script which calls a git command (git credential-wincred store) to store credentials to connect to a git repository. ...
0
votes
1answer
40 views

Find repeated numbered files

I have a bunch of files with names like this file_1_v4_sdk.x file_2_v1_3kl.x file_3_v1_39f.x file_3_v2_df0.x file_4_v4_f33.x file_4_v1_fks.x file_4_v5_skd.x file_5_v2_9ks.x file_6_v4_911.x ...
0
votes
1answer
80 views

Shell Script to pass arguments to another script

I am new to the linux and shell scripting. I have a script, which has some read commands in it. So, something like #script1.sh echo "something here" .... read var1 read var2 ... Now, i want to ...
1
vote
1answer
358 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
38 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 ...
1
vote
1answer
72 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
34 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. ...
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 ...
1
vote
1answer
79 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 ...
0
votes
1answer
34 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
2answers
40 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 C:\Users\Foo\Videos\Art\Movies\...
0
votes
2answers
2k 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 ...
2
votes
1answer
70 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
0answers
137 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), ...
1
vote
1answer
51 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 ...
0
votes
1answer
31 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 ...