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'd like an app that would...rename one file to be the same name as another. gently caress I dunno how that would work :smith:.

I just use subtitles a lot since im deaf and the dubbing codec only dubs subtitle files if they are the same name as the movie file (except extentions) it's just annoying having to copy the file name and paste it every time v:shobon:v . Maybe a thing where I select two files with ctrl and either press a hotkey or right click menu and duplicate name v:shobon:v .

Adbot
ADBOT LOVES YOU

Xachariah
Jul 26, 2004

DLCinferno posted:

edit: Moving to the wiki:

http://tinyappz.com/wiki/Duplicate_Renamer

Thanks, but when I try and drag a .avi it says 'Path is not of legal form' or something like that.

Xachariah
Jul 26, 2004

I'll state what I want more clearly.

I want an app that add's context menu items to copy a file name to the clipboard with 'Copy Name' and rename another file that name thought 'Paste Name', but disregarding the extension.

The app will be EXACTLY the same as the following, but WITHOUT the copying of extensions: http://www.extrabit.com/copyfilenames/

Xachariah fucked around with this message at 23:55 on Jul 17, 2007

Xachariah
Jul 26, 2004

My problem is that I have a .txt file that is formatted/converted horribly and requires a quick, non-time consuming fix.

Specifically, the .txt file has paragraph breaks used as line breaks, thousands and thousands of them. Now if I wanted to indiscriminately nuke paragraph breaks, that's easily possible using Microsoft Word find and replace (replace ^p with space). However the formatting suffers as there is thus no paragraphs remaining.

So I need a selective find and replace app that operates like this:

If it comes to a paragraph break which is immediately preceeded by a quotation mark or full stop - do nothing. (respectively they are " and .)
Otherwise, replace paragraph break with a space.

Note, inverted comma isn't a quotation mark. Quotes signal the end of someone speaking in this particular text while inverted commas signals someone continuing to speak.

It's not perfect, sometimes I may be putting the last sentence of a paragraph into the following paragraph, but it's a quick and dirty way of correcting the terrible formatting while retaining paragraphs and not chopping sentences up.

Example input - example.txt

This is my example sentence, it is broken up in the
middle by a wayward paragraph break.
However, this is an actual paragraph, you can see this
as the following line ends in a full stop while the other don't.
'I'm gasping in shock', he gasped, 'How am I going to fix
all these annoying Paragraph Breaks?"
'I dunno,' she replied. 'Maybe you can ask the tiny app thread?"

Example output - example fixed.txt

This is my example sentence, it is broken up in the middle by a wayward paragraph break.
However, this is an actual paragraph, you can see this as the following line ends in a full stop while the other don't.
'I'm gasping in shock', he gasped, 'How am I going to fix all these annoying Paragraph Breaks?"
'I dunno,' she replied. 'Maybe you can ask the tiny app thread?"

EDIT: The Paragraph break is denoted by a pilcrow sign (¶) in Microsoft Word when you go to Tools>Options>Display and select the box called "Paragraph marks". Not sure how it's denoted in a .txt file.

Xachariah fucked around with this message at 10:58 on May 20, 2009

Xachariah
Jul 26, 2004

kaniff posted:

I dunno wtf on the wiki, but you can download it here:

http://www.tinyappz.com/wiki/Paragrapher

It requires .NET 3.5 and is really just running a regex from box 1 to box 2. Let me know if it works for you.

Thanks for the effort but there are a couple of issues. Your program only deletes the paragraph breaks, instead of replacing them with a space (important, as these paragraph breaks occur immediately after words, so now every paragraph thats removed glues two words together). And is there anyway to make it so you put the .txt file in and it gives you a fixed .txt file, instead of having to copy and paste into the window? It's unwieldy doing it the latter way when you have a .txt file with over 100 pages.

Xachariah
Jul 26, 2004

kaniff posted:

Uploaded another try to the tinyappz page. Give it a try.

http://www.tinyappz.com/wiki/Paragrapher

It doesn't retain the paragraphs after the quotation marks, and can still only be used for text you cut and paste instead of converting a text file into another fixed text file.

Xachariah
Jul 26, 2004

kaniff posted:

Ok, the new one didn't upload. Try again from the link or from here:
http://www.tinyappz.com/wiki/Image:Paragrapher.zip

Perfect now, thanks a lot man.

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

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

  • Locked thread