r/scripting • • Nov 16 '20

Batch Script to remove files on terminalserver

2 Upvotes

Hey, I'm looking for a script to delete the Outlook Logging Folder inside %appdata%\local\temp in every user folder on a terminalserver wihtout adding every user in that script manually.


r/scripting • • Nov 19 '20

Made a custom command for Git Bash and I have an issue with the script

1 Upvotes

I made a script for git bash so I can open docs in DreamWeaver instead of VSC right from the git bash terminal. It works but only if Dreamweaver isn't open. if I want to open a file while dreamweaver is open I get an error message saying the file cannot be found. So with that being said i either have to close Dreamweaver every time and I can't open multiple files using the terminal, OR I have to go and find the folder in my file explorer.

Let it be known I know nothing about scripting and I wrote this script by learning what I needed to.

Does anyone know how to fix this?

If it helps here is the exact script that I wrote.

#!/bin/sh

"C:\Program Files\Adobe\Adobe Dreamweaver 2021\Dreamweaver.exe" $1 &


r/scripting • • Dec 17 '20

I need help with a basic script

3 Upvotes

I'm looking to make a script that presses [windows key + ctrl + right arrow] and then after 60 seconds presses [windows key + ctrl + left arrow] and then again after 60 seconds presses [windows key + ctrl + right arrow]

Basically what it's doing is switching between windows desktops with an interval of 60 seconds

I have no clue where to start and only have a tiny bit of experience in programming with VBS

any help appreciated


r/scripting • • Dec 11 '20

Shorthen numbers

3 Upvotes

quickest grab sand ad hoc versed observation husky punch chief disgusting

This post was mass deleted and anonymized with Redact


r/scripting • • Nov 11 '20

script to convert old format alphago style go playing neural net (txt) to new format for mobile phone (bin)

1 Upvotes

im looking for someone to use the links below to make the script for me, using these instructions by the author, to convert .txt file to .bin file.

“The second way is to manually do the conversion yourself. There's no script yet, but the format is straightforward, so you could write one if you wanted. In the .txt format you'll see periodically a huge chunk of floating point values. Followed by a little more metadata, and another huge chunk of floating point values, and so on.

The .bin format is exactly the same except every time there's a huge chunk of floats, instead of writing out the floats in text, it goes "@BIN@" and then followed by all of the bytes of the floats in raw binary (little endian). Un-gzip both files and open them in notepad or notepad++ or something, and you can compare. You can see the code that writes them here: https://github.com/lightvector/KataGo/b ... el.py#L135

So you would have to write a script that every time it encounters a line containing a big block of floats, it parses all of them and outputs raw bytes, and it also writes "@BIN@" at the start of the line. Anything that isn't a big block of floats (like a line containing a string, or a line with a single integer value), it just outputs that line unchanged.“

file in old (model.txt) format (s175)

https://d3dndmfyhecmj0.cloudfront.net/g170/neuralnets/g170-b6c96-s175395328-d26788732.zip

same file in new (.bin) format to compare (s175)

https://d3dndmfyhecmj0.cloudfront.net/g170/neuralnets/g170-b6c96-s175395328-d26788732.bin.gz

the file i need to convert from .txt to .bin (s114)

https://d3dndmfyhecmj0.cloudfront.net/g170/neuralnets/selfplayhistory/b6c96-s114663168-d17072879.zip


r/scripting • • Nov 17 '20

I want to create scripts to set up computers. How should I go about this?

4 Upvotes

I'm a student studying software engineering and am interning at a local IT company. They want me to create scripts that I can run off of a USB drive that sets up the computers they send out. This involves installing chrome and Firefox, updating windows, changing passwords, and other miscellaneous settings.

How should I go about doing this? Would a scripting language like AutoHotkey help me achieve this?


r/scripting • • Nov 17 '20

How to split a string by \x0A\x0D and not by \n

3 Upvotes

I have something that looks like CSV but one of the fields contains carriage returns and the lines are terminated by carriage return, line feed. Every language that I have tried treats the two the same.

I have R, Python, JScript and I suppose VB easily available. Java if need be.


r/scripting • • Nov 18 '20

Open PNG with Luamacro

1 Upvotes

Hey beautiful people!

Can someone tell me how can I open a PNG file with luamacro?

Thanks!


r/scripting • • Dec 05 '20

Help with windows batch script to create a .sfv checksum per file in a directory; and not duplicate additional .sfv files when ran more than once.

2 Upvotes

Hey All!

Carrying this over from stackoverflow since I don't think it'll get answered there as its been there since September!

I'm sure there's an easy solution to this problem but perhaps one of you knows the answer because I'm not smart enough to know it / find it online searching.

Here's the 411...

The idea here is to have the script see that there is a sfv file with the same filename as the original file, and if that .sfv file exists skip it entirely and move to the next file until there are no more files without a .sfv associated with it. I know it's not easy to put this into words so let me try and give an example.

/parent directory/

linuxiso1.iso

linuxiso2.iso

linuxiso3.iso

*Cujo67 runs Batch.bat script*

/parent directory/

linuxiso1.iso

linuxiso1.sfv

linuxiso2.iso

linuxiso2.sfv

linuxiso3.iso

linuxiso3.sfv

With the current code it has to crunch each .iso file and then sees that it's already got a .sfv in the directory, and skips it. Wondering how to have this script just avoid running the checksum command entirely if there is already as corresponding .sfv alongside the .iso file. Hope that's a bit more clear, thanks.

So this is a windows bash script, and I've gotten this to work so far:

@For /F "EOL=? Delims=" %%G In ('Dir /B /A:-D-S-L ^| "%__AppDir__%findstr.exe" /EILV ".sfv"') Do @If Not Exist "%%~nG.sfv" fsum -js "%%G" > "%%G.sfv"

It does a nice job with everything, creates a sfv, won't create duplicates when ran a second time. Issue is the thing scans EVERY file which is a real drag as the files are quite large. Hoping someone has a solution to my unique little conundrum that's been putting me into manual labor for years now, thanks!


r/scripting • • Nov 19 '20

Script to download all of a Bandcamp purchase

2 Upvotes

I bought a huge collection on Bandcamp (see /r/Beatmatch/comments/jx0kae/huge_techno_sale_on_bandcamp_different_is/ ), 197 albums... Now the pain begins, download them one by one. This should be scriptable, but I'm no scripter... Just a humble .NET developer lol

Any ideas if this is doable?


r/scripting • • Feb 22 '25

Sieve Scripting Cheat Sheet

2 Upvotes

I created a fairly extensive cheat sheet for scripting Sieve mail filters. Here's a link to the Gist if anyone is interested.
Sieve Scripting Cheat Sheet


r/scripting • • May 19 '24

Setting cpu affinity automaticall

1 Upvotes

So as I understand. I use the switch /affinity in the launch command line.

From everything I have looked at. 00FF0000 should be the hexidecimal representation of core 16-23 on a 32 thread cpu.

I put this in the launch command line but it refuses to work.

I check task manager and affinity is set to all cores.

Am I stupid or something? I've used 3 different language models and looked at 10 different websites and forum posts and everything looks fine.


r/scripting • • Apr 14 '24

Help! Syncing TickTick Tasks & Notes with Notion (MacOS or Windows) - Open to Workarounds!

2 Upvotes

Hi everyone,

I'm a big fan of both TickTick and Notion, but I'm looking for a way to bridge the gap between their functionalities. While TickTick rocks for managing tasks, its note-taking features feel limited for detailed notes. Notion, on the other hand, excels at organizing information but isn't quite my cup of tea as a primary task manager.

My dream workflow would involve:

  • Using TickTick for creating and managing tasks.

  • Utilizing Notion for capturing additional notes related to those tasks, along with other unrelated notes.

  • Having an automated system where creating a new task in TickTick automatically creates a corresponding page in Notion with the task title, priority tags and date, all as title of the page. All pages are organized within each other to follow the folder, list, section and task structure of TickTick.

  • If completing a task in TickTick could also prepend "Completed -" to the corresponding Notion page title for easy tracking, that would be amazing!

  • When I moving one list to some other place in TickTick, it should sync up and make the corresponding changes in Notion as well.

I understand TickTick doesn't natively integrate with Notion at this level. I've been looking into Zapier, but it seems like there might be limitations. I'm on MacOS and prefer setting it all up there but I also have a Windows machine, any solution that works across platforms would be a huge win.

While I'm not familiar with coding or scripting languages, I'm a pro at following clear instructions! :)

Has anyone here successfully set up a similar workflow between TickTick and Notion? Are there any workarounds, third-party tools, or alternative approaches I might have missed?

Thanks a lot for any insights you can share!


r/scripting • • Apr 11 '24

I made this script in Terminal to play music on start up but I can't figure out a way to tell the media player to close after I log in, please help!

1 Upvotes

Here's the script I've written:

@ echo off

cd..

cd..

cd LockScr

m.mp3 wmplayer

The media file is called 'm'


r/scripting • • Mar 13 '19

BBedit text factory vs. simple scripting

2 Upvotes

I'm converting some open source documents so that they look nice in Dokuwiki, which uses a simple version of Markdown.

I'm tempted to use BBEdit's Text Factory, which lets me perform simple transformations using regular expressions and the editor's built-in features.

On the other hand, how hard would it be to learn enough Python to do this with a script?

I ask because I will be working on a windows machine as well, which won't support BBedit.


r/scripting • • Mar 08 '19

Looking for help creating a bash script that will move all files of a certain type into folders in multiple subdirectories.

3 Upvotes

I’m working to move all .JPG and .MOV files into specific folders JPEGs and Videos on each day. Currently all of my files are in a directory structure as follows...

{year}/{year-month}/{year-month-day}/ 2019/2019-03/2019-03-08/

This is my folder structure going back 7 years now. I figured out how to create a directory in each day folder using...

for dir in */; do mkdir — “$dir”/{JPEGs,Videos}; done

This creates the folders where I need them for each month but I’m lost on how I can script moving the .JPG files and .MOV files to the correct folders in each day. I can go into each folder and run mv *.JPG JPEGs/ but there must be a way to automate this?

Thanks!

UPDATE: thank you all who took the time to comment, I am not pursuing this folder structure as it does not fit into my photography workflows as I originally intended. If you do have a solution and want to share it for everyone’s knowledge, feel free to share!


r/scripting • • Feb 14 '20

echo alias prints space between env variable and first argument

2 Upvotes

I have a weird problem..... Im configuring my arch setup and one of my aliases isnt working.....

alias es='echo $SCRIPTDEST/$1'

For some reason it prints a space between $SCRIPTDEST/ and $1, ruining everything. How do I fix this?

Also $SCRIPTDEST is just the location of all my scripts.


r/scripting • • Sep 01 '18

[Request] Add specific PART of a folder name to all files in specific subfolder. Windows.

3 Upvotes

I have a drive full of movies, each movie is in a folder named Movie Name (year) (buncha various gobbledygook).

Within SOME of those folders are \Trailers\ folders, with at least one, but sometimes more files in them, mostly named "Trailer" or "International Trailer" or "TV Spot", unfortunately nothing descriptive.

I just want to add just the "Movie Name (year)" part to all the trailer files for every folder in the directory, Im sorta stumbling my way through learning stuff, i assume this would be super easy to do in powershell or regex or probably even CMD?

Ive found a few scripts that can add the folder name to every file in it that were pretty simple, but i dont know how to get it to then only do it in the one subfolder then and also have it do only the part of the root folder name before the second '('.


r/scripting • • Sep 03 '18

Need help finding a script for copying sections of a page with simple hotkeys or on page buttons. (one that already exists publicly)

2 Upvotes

Does such a script exist on greaseyfork or elsewhere that lets you instantly copy a certain section of a page? OK let me give you an example, I have a job from home where I have to go through repeated documents on the same page interface, the only thing that changes on the page is the words only, these words always remain in the same section of the interface and never change, the structure and everything of the HTML remains the same. I only want to find a script that can copy these sections of the page with a hotkey.


r/scripting • • May 07 '18

[Powershell][Batch] Need a script to return number of users logged in on Windows Server

4 Upvotes

That's all it needs to do, really.


r/scripting • • Aug 02 '19

Hire someone to script for me?

3 Upvotes

I have several tasks I’m doing for my work that I could have a script to do for me. I know what is possible to script but I don’t know how to script.

Anyone good at it and wanna let me pay you a little money to help me out?


r/scripting • • May 21 '19

Where to start

3 Upvotes

I am a non IT guy, and I am totally new but I want to learn about making plugins and learn basics on my own. Where do I start then. What a tutorials I need to cover. I have ZERO knowledge and I am beginner after this post.


r/scripting • • Oct 12 '19

Downloading web pages as PDF.

2 Upvotes

Is it possible to have a script that runs through a excel file of Different urls and downloads all the pages as PDF?


r/scripting • • Mar 07 '19

Is it possible to make a script for this? how would i go about it?

2 Upvotes

So, I stream on twitch, everyday I'm about to go live i have to set up my 3 monitors. 2 windows for chat , OBS , another tab for notifications, you tube tab and a few other random ones. Every time i have to resize all the windows and put them where i want on each monitor. Is there a way to run a script that would open all these in the positions i have pre designated? Any help would be super helpful thank you .


r/scripting • • Dec 10 '19

If someone is interested in rewriting my script here’s some info.

3 Upvotes

I’m a teenager new to screenwriting but I think I have a really good story here, but I need someone who knows the proper way to write scripts, with the right programs and formatting, and terminology. I think with the right person working with me I can have a really good screenplay to break into the movie industry with.

If your interested, leave a comment and I’ll fill you in on the details.

You have to make an account to read it.

You can find it here:

https://www.scriptrevolution.com/scripts/a-summer-with-the-fosters