Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Xachariah
Jul 26, 2004

I doubt this is even possible, but here goes.

I would like an application that goes through a directory of files and do the following to each file in the directory:

1. Rar the file
2. Rename the newly created rar so that the extension of the file in the rar is added to the end of the rar name.
3. Delete the original file.
4. Move on to the next file in the folder.

For example, if the directory contains:

File1.mpg
File2.doc
File3.png

Then the program should create:

File1 [mpg].rar
File2 [doc].rar
File3 [png].rar

Probably unfeasible due to the nature of rar being a proprietary format but worth a shot, would save me a lot of time individually raring from the shell context menu and renaming by hand.

EDIT: Alternatively, I'll settle for an application that:

1. Looks in the rar archive.
2. Appends the extension of the file in the rar archive (there will only every be one file per archive) to the name of the rar file in square brackets.

Xachariah fucked around with this message at 18:50 on Jul 29, 2011

Adbot
ADBOT LOVES YOU

Mario
Oct 29, 2006
It's-a-me!
If you're on Windows, this PowerShell script should work (at your own risk)
code:
$winrar = "C:\Program Files\WinRAR\Rar.exe"

foreach($file in Get-Childitem . -Exclude "*.rar" | Where-Object {!$_.PSIsContainer})
{
	$outputFileName = $file.BaseName + " [" + $file.Extension.Replace(".", "") + "]"
	& $winrar a -df $outputFileName $file.Name
}
You need to have WinRAR installed and the first line has to point to its command line executable.

Xachariah
Jul 26, 2004

Mario posted:

If you're on Windows, this PowerShell script should work (at your own risk)
code:
$winrar = "C:\Program Files\WinRAR\Rar.exe"

foreach($file in Get-Childitem . -Exclude "*.rar" | Where-Object {!$_.PSIsContainer})
{
	$outputFileName = $file.BaseName + " [" + $file.Extension.Replace(".", "") + "]"
	& $winrar a -df $outputFileName $file.Name
}
You need to have WinRAR installed and the first line has to point to its command line executable.

Heh, I'm retarded, I have no idea how to run this script, I'm doing some googling but if anyone wants to give me pointers in the meantime I would appreciate it.

EDIT: Oh hey, it works now. How do I point it at a folder instead of it raring itself in its own folder?

EDIT2: I've just started putting it in the folder, cd "folderpath" and then executing the script. Then unraring it and cut/pasting it into the next folder. Only issue I have is that it sometime neglects to put the .rar extension in the name, but nothing a bulk rename cant fix. Thanks a lot!

Xachariah fucked around with this message at 07:50 on Jul 30, 2011

Vykk.Draygo
Jan 17, 2004

I say salesmen and women of the world unite!
This isn't necessarily a custom app request if something like this already exists, but I guessing it probably doesn't. I have a folder (let's call it Aaa) that has about 400 folders in it (Bbb), and each of those folders has four subdirectories and then a file. So the directory structure looks like this:

Aaa/Bbb1/Ccc/Ddd/Eee/Fff/File.ext
Aaa/Bbb2/Ccc/Ddd/Eee/Fff/File.ext
Aaa/Bbb3/Ccc/Ddd/Eee/Fff/File.ext
etc.


What I need to do is get rid of the Ccc and Ddd folders while preserving the rest of the folders, so it ends up looking like:

Aaa/Bbb1/Eee/Fff/File.ext
Aaa/Bbb2/Eee/Fff/File.ext
Aaa/Bbb3/Eee/Fff/File.ext

I googled it but all I found were people getting fussy because it's such an odd request. Is there a way to get this done? If it helps, Ccc and Ddd are named consistently throughout all of it, but all the other folders have varying names.

edit: Nevermind, after hours and hours of frustration, I finally got what I wanted out of a program called LevelZap.

Vykk.Draygo fucked around with this message at 22:01 on Jul 30, 2011

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
I have a really frustrating problem, and by looking at Google results I am not the only one! I have a folder full of product images. They are of multiple sizes and more importantly shapes. We are talking some images are 500px X 500px and some are 236px X 2934px!

I need all these images to be squares. The size of the square is not important as the software I am using on the web shop will scale them something like 450 X 450 would be great. I have looked at Photoshop's integral image processing feature but cant get it to scale to a square of a certain size. Has anyone done this before with any success?

Dicky B
Mar 23, 2004

That's really easy to do in Photoshop. Just make a macro that resizes the image to the desired size and run it on your images using the batch processor. What's the actual problem you're having?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

thegasman2000 posted:

I have a really frustrating problem, and by looking at Google results I am not the only one! I have a folder full of product images. They are of multiple sizes and more importantly shapes. We are talking some images are 500px X 500px and some are 236px X 2934px!

I need all these images to be squares. The size of the square is not important as the software I am using on the web shop will scale them something like 450 X 450 would be great. I have looked at Photoshop's integral image processing feature but cant get it to scale to a square of a certain size. Has anyone done this before with any success?
I'm sure imagemagick can handle this.

I don't know what exact options you would need, partly because there are a ton of options and I don't know them very well, and partly because your problem is unclear. How do you want to handle things that have a non-square aspect ratio? do you want to crop the longer dimension or pad the shorter one? Do you want to keep the image exactly centered when cropping/padding?

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:

Dicky B posted:

That's really easy to do in Photoshop. Just make a macro that resizes the image to the desired size and run it on your images using the batch processor. What's the actual problem you're having?

Sorry to be more clear... I have all different sizes and shapes and need them to all be square. the problem with Photoshop is that when it takes a 61 x 1551 image and I set it to make 415 x 415 it outputs a rectangle of 8 x 415. I need a 415 x 415 with white space on either side.

to be honest I am not sure that is any clearer!

Corla Plankun
May 8, 2007

improve the lives of everyone
Uncheck "Constrain Proportions" you silly goose!

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:

Corla Plankun posted:

Uncheck "Constrain Proportions" you silly goose!

Oh how I wish I was a goose...

Dicky B
Mar 23, 2004

You need to create an action (which is what adobe calls macros) which performs your resizing operation, and select it under section 4 of the image processor options, instead of using the inflexible "resize to fit" operation under section 3.

Sharkface
Apr 20, 2002

thegasman2000 posted:

Sorry to be more clear... I have all different sizes and shapes and need them to all be square. the problem with Photoshop is that when it takes a 61 x 1551 image and I set it to make 415 x 415 it outputs a rectangle of 8 x 415. I need a 415 x 415 with white space on either side.

to be honest I am not sure that is any clearer!

try telling me what you want to do using the words crop and resize.. It sounds like a pretty simple powershell script once that gets sorted out.

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:

Sharkface posted:

try telling me what you want to do using the words crop and resize.. It sounds like a pretty simple powershell script once that gets sorted out.


Awesome, I would like to resize the image, keeping its proportions, to a certain size. Then Crop the image into a square whilst not loosing any of the image.

for example I would need this - http://www.total-outdoors.co.uk/Productimages/WSBImages/Metalwork/MW010.jpg
and this - http://www.total-outdoors.co.uk/Productimages/WSBImages/Metalwork/MW034.jpg

To look like - http://www.total-outdoors.co.uk/Productimages/WSBImages/Thumbnails/Metalwork/thumbnail1.jpg

and - http://www.total-outdoors.co.uk/Productimages/WSBImages/Thumbnails/Metalwork/thumbnail2.jpg

Corla Plankun
May 8, 2007

improve the lives of everyone

thegasman2000 posted:

Then Crop the image into a square whilst not loosing any of the image.

:psyduck:

bbcisdabomb
Jan 15, 2008

SHEESH

thegasman2000 posted:

Awesome, I would like to resize the image, keeping its proportions, to a certain size. Then Crop the image into a square whilst not loosing any of the image.

for example I would need this - http://www.total-outdoors.co.uk/Productimages/WSBImages/Metalwork/MW010.jpg
and this - http://www.total-outdoors.co.uk/Productimages/WSBImages/Metalwork/MW034.jpg

To look like - http://www.total-outdoors.co.uk/Productimages/WSBImages/Thumbnails/Metalwork/thumbnail1.jpg

and - http://www.total-outdoors.co.uk/Productimages/WSBImages/Thumbnails/Metalwork/thumbnail2.jpg

This actually isn't possible with just crop and resize - you're looking to add white space to the edges of the pictures to create a square.

If you don't mind resizing all your pictures, Irfanview can do this in Batch mode - just have it resize everything by long side to, say, 800 pixels and set the canvas to be 800x800. Then you won't have any retardedly huge pictures getting in the way.

e. vv Your writeup is much nicer than mine.

bbcisdabomb fucked around with this message at 18:29 on Aug 19, 2011

CuddleChunks
Sep 18, 2004

thegasman2000 posted:

Awesome, I would like to resize the image, keeping its proportions, to a certain size. Then Crop the image into a square whilst not loosing any of the image.

Good luck with finding an automated way to do that. In the meantime, to make square thumbnails of your original images you could use the batch processor in IrfanView. Download and install.

Open Irfanview and Click File -> Batch Processing
Choose "Batch conversion and rename files"
Check Use advanced options and select JPG output format
Under advanced options choose to Resize and set one side to specific width and height. Uncheck "preserve aspect ratio" because we're just going to jam these into squares for now.
Change the naming pattern to fit your scheme (append _thumb to the filename)
Choose an output directory and then you can select your input files. Vroom, off you go.

I just ran this myself on a folder full of assorted picture files. It ran very quickly and the results are pretty good. The aspect ratios are definitely off but all of the image data is present. I think if you keep the "preserve aspect ratio" checked it will fill in empty areas with black.

Sharkface
Apr 20, 2002

thegasman2000 posted:

Awesome, I would like to resize the image, keeping its proportions, to a certain size. Then Crop the image into a square whilst not loosing any of the image.

for example I would need this - http://www.total-outdoors.co.uk/Productimages/WSBImages/Metalwork/MW010.jpg
and this - http://www.total-outdoors.co.uk/Productimages/WSBImages/Metalwork/MW034.jpg

To look like - http://www.total-outdoors.co.uk/Productimages/WSBImages/Thumbnails/Metalwork/thumbnail1.jpg

and - http://www.total-outdoors.co.uk/Productimages/WSBImages/Thumbnails/Metalwork/thumbnail2.jpg

i dont have an easy way to do this in powershell. its possible, but i'd have to modify the RGB directly. there has to be an easier way. just curious tho, why don't you size it in the html of the webpage you're displaying it in?

blackbox
Aug 7, 2006

thegasman2000 posted:

Awesome, I would like to resize the image, keeping its proportions, to a certain size. Then Crop the image into a square whilst not loosing any of the image.

for example I would need this - http://www.total-outdoors.co.uk/Productimages/WSBImages/Metalwork/MW010.jpg
and this - http://www.total-outdoors.co.uk/Productimages/WSBImages/Metalwork/MW034.jpg

To look like - http://www.total-outdoors.co.uk/Productimages/WSBImages/Thumbnails/Metalwork/thumbnail1.jpg

and - http://www.total-outdoors.co.uk/Productimages/WSBImages/Thumbnails/Metalwork/thumbnail2.jpg

You could do this using ImageMagick:

code:
D:\Desktop\ImageMagick-6.7.1-Q16-windows\ImageMagick-6.7.1-8>mogrify.exe -resize 400x400 -gravity center -extent 400x400 -path thumbs D:\Desktop\*.jpg

Cool Matty
Jan 8, 2006
Usuyami no Sekai
This may seem a bit ridiculous, but I'm looking for an app that will force the volume on my microphone to always be 100%. The app just needs to run in the background and check occasionally (especially on bootup).

For some inane reason, I have an Eyeball 2.0 that likes to do some sort of weird auto-level adjustments every time I restart. It ends up turning the microphone level down to super-low levels. Naturally, it has no options for this (or any options at all, really), and the drivers themselves are just generics over USB.

I'm running Windows 7 x64 if that matters!

corgski
Feb 6, 2007

Silly goose, you're here forever.

I could use this too, although I'd love it if I could configure the level. Google+ does the exact same thing to me when I try to use hangouts.

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:

CuddleChunks posted:

Good luck with finding an automated way to do that. In the meantime, to make square thumbnails of your original images you could use the batch processor in IrfanView. Download and install.

Open Irfanview and Click File -> Batch Processing
Choose "Batch conversion and rename files"
Check Use advanced options and select JPG output format
Under advanced options choose to Resize and set one side to specific width and height. Uncheck "preserve aspect ratio" because we're just going to jam these into squares for now.
Change the naming pattern to fit your scheme (append _thumb to the filename)
Choose an output directory and then you can select your input files. Vroom, off you go.

I just ran this myself on a folder full of assorted picture files. It ran very quickly and the results are pretty good. The aspect ratios are definitely off but all of the image data is present. I think if you keep the "preserve aspect ratio" checked it will fill in empty areas with black.

Cheers dude, I got it working in IrfanView.

Cool Matty
Jan 8, 2006
Usuyami no Sekai

thelightguy posted:

I could use this too, although I'd love it if I could configure the level. Google+ does the exact same thing to me when I try to use hangouts.

You know, this makes me wonder if it is the Talk plugin responsible for this. I never really made the connection (as I always launch GMail as soon as I start my system), but it's actually quite plausible that this is the fault of that plugin and NOT the microphone! That would be nice to know.

And of course, it doesn't invalidate our request ;)

RagingBoredom
Apr 11, 2005

I'm bored as hell. Help me.
I don't know how big of a job this would be or even if it already exists somewhere but what I'm looking for is a screenshot program that meets these requirements:

1. Would ideally start with windows and sit in the background. No GUI for main program needed.
2. Must take and save a screenshot of the active window whenever a hotkey is pressed.
3. After every capture hotkey press, a small input box appears and asks what I want to name the file. File format doesn't really matter to me just as long as I can open it later.
4. Either by way of another hotkey or right clicking on a tray icon (or both) a settings page that allows me to change the default path to save the screenshots at and to change the capture hotkey.
5. Here's the absolute MUST though...if the active window has a scroll bar (such as a webpage), it must be able to automatically scroll the page and capture the entire thing.

The reason I need something like this is because I'm back in school after ~7 years and all of our tests are on computer. We don't get a physical copy of our results but the software we take the test in does show the results and I'd like to be able to save the entire thing so that I can reference it and use it to help study when my midterms and finals roll around, hence the need to recognize the scroll bar and capture the entire thing instead of just the visible portion.

If this falls out of the realm of a tiny custom app then I completely understand but if someone knows of an existing piece of software that does most, if not all, of this (definitely MUST have #1, #2, and #5 though) then I would greatly appreciate it if you pointed me in the right direction. And if someone does take on this request then sometime in the future, I would be willing to throw :10bux: their way eventually but I'm a poor, unemployed student so it might take a month or two before I can justify it.

Additional Info:
On the days that I take tests, I usually take anywhere between 3-5 tests so the less interaction I need to have with the program the better. So if all I had to do was to press the hotkey, type the filename in the prompt, and hit enter and the program would take care of the rest then that would be phenomenal.


EDIT:
Just noticed that FastStone Capture pretty much does what I need except for asking for my input on what to name the file. It's $20 and I'm seriously considering throwing down the cash since my request above is probably too complex for the thread. So instead, what about a small program that monitors a specific folder for new files. Upon starting the program, it could make note of the existing files in the folder and every time the hotkey is pressed, it checks for changes. If new files are present, it pops up a small window just big enough for a line of text stating the current file name and an input box below it where I could type the new filename. Changes get made when I hit enter and if there's more than one new file, that small window keeps popping up until I've renamed them all. Then, after all are renamed, it updates the list of current files to compare it to the next time I hit the hotkey. Also, a settings page to change the folder to monitor and the hotkey would be good. Accessing it by right clicking on a tray icon would be great.

If anyone takes this request, I thank you in advance :)

RagingBoredom fucked around with this message at 12:11 on Aug 21, 2011

Dicky B
Mar 23, 2004

http://www.donationcoder.com/Software/Mouser/screenshotcaptor/

RagingBoredom
Apr 11, 2005

I'm bored as hell. Help me.

Seems like a solid program but I'm having some issues with it. Not sure if it's user error or what but it wouldn't register my clicks on anything after a capture, had to ctrl+alt+del to bring up task manager and then switch between windows with alt+tab before it would register my clicks, and started making my screen quickly flash between what was visible and complete blackness on another capture. I'm probably going to go the FastStone Capture route but I do appreciate the suggestion.

If anyone wants to try to tackle my folder monitoring request then I would greatly appreciate it.

CuddleChunks
Sep 18, 2004

RagingBoredom posted:

If anyone takes this request, I thank you in advance :)
This is my favorite screen capture tool: http://www.mirekw.com/winfreeware/mwsnap.html

I think it has all the features you had specified. It can also just auto-name and save screens so that you can use your hotkey and move on to the next frame without having to bother with names each time.

Hughmoris
Apr 21, 2007
Let's go to the abyss!
Question answered.

Hughmoris fucked around with this message at 10:12 on Oct 8, 2011

Dicky B
Mar 23, 2004

Hughmoris posted:

If there is a way to do this from the command prompt, I'm all ears. Thanks.
del /s *.tgmd

Hughmoris
Apr 21, 2007
Let's go to the abyss!

Dicky B posted:

del /s *.tgmd

Thank you!

Heran Bago
Aug 18, 2006



What was that free app that allows you to control two computers with one mouse/keyboard?

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.
http://synergy-foss.org/ ?

Heran Bago
Aug 18, 2006



Aleksei Vasiliev posted:

http://synergy-foss.org/ ?

Wow that was quick! Yes, that is exactly the one. Thank you!

odi3
Dec 17, 2003
Hi, I need a simple app for a friend starting up a new business. It needs to take the DoNotCall numbers out of the main list. It can be in C or C++.

I will offer a free forum upgrade feature to the first solution that works.

Main list is about 400,000 lines and looks like this:

Address,City,First,Last,Phone,Postal Code,
111 SUPER DR,LONDON,A,FLOYD,1112223333,A1A2B2,
222 SUPER DR,LONDON,B,FRANK,3334445555,A1A2B2,
333 SUPER DR,LONDON,C,SMITH,6667778888,A1A2B2,
444 SUPER DR,LONDON,D,JONES,9990001111,A1A2B2,

DNC.csv has about 800,000 lines, (some duplicates) Looks like this:

333,4445555,,,,
666,7778888,,,,

Output file should look like this:

Address,City,First,Last,Phone,Postal Code,
111 SUPER DR,LONDON,A,FLOYD,1112223333,A1A2B2,
444 SUPER DR,LONDON,C,SMITH,9990001111,A1A2B2,

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.
How dumb do you have to be to create a Do Not Call list and then let telemarketers download a complete list of every number in it :psyduck:

(apparently Canada, at least, does this)

Achmed Jones
Oct 16, 2004



Aleksei Vasiliev posted:

How dumb do you have to be to create a Do Not Call list and then let telemarketers download a complete list of every number in it :psyduck:

(apparently Canada, at least, does this)

If you don't give it to people, how exactly would they know what number not to call? The alternative is setting up a centralized outbound-calling service that checks each number before calling, which would (1) Cost a bunch (2) Be prone to malfunction and (3) Allow people to figure out what numbers are on the list anyway.

It's illegal to call numbers on the list. That's what keeps people from doing it.

Dicky B
Mar 23, 2004

Working on it!

ToxicFrog
Apr 26, 2008


Aleksei Vasiliev posted:

How dumb do you have to be to create a Do Not Call list and then let telemarketers download a complete list of every number in it :psyduck:

(apparently Canada, at least, does this)

As Achmed points out, this is really the only practical way to do it.

At least here in Canada, though, it looks like your number gets broadcast to them at the start of the two-week grace period they get, or something, because the number of telemarketing calls you get goes WAY up during those two weeks.

Dicky B
Mar 23, 2004

odi3 posted:

Give this a try http://www.pleasesendhelp.com/Apps/DonutCall.exe

I haven't tested it on any really large data sets. It might break horribly and kill your cat.

The first time you run it it will create a config file in \AppData\Roaming\donutcall. There are some options in there to change which columns to look at if you need to. The default config is set up as per your example. You might also be able to increase performance by altering the "threads" option.

Run it like this:
DonutCall --mainlist=mainlist.csv --dnclist=dnclist.csv --out=outputlist.csv

If you don't specify an output file then it will save to 'out.csv'

odi3
Dec 17, 2003
Thanks Dicky!

Works great, and cat is still alive!

Adbot
ADBOT LOVES YOU

Ceros_X
Aug 6, 2006

U.S. Marine
Don't know if there is a pre-existing app/plugin, but I've searched a lot and posted a general SH/SC question and haven't found anything. I'm looking for a small plugin that will go through and scan my Pandora's Like's list and then output a textfile with artist/song.

If anyone knows of something pre-existing, that'd be great but if not a small greasemonkey script or somethign would be awesome.

  • Locked thread