Computer Questions Not Worth Their Own Thread II

I was looking for how to delete duplicate lines from a text file and I found quite a few scripts but Im not sure how to use these scripts. Can somebody tell me what I should do now?
 
I was looking for how to delete duplicate lines from a text file and I found quite a few scripts but Im not sure how to use these scripts. Can somebody tell me what I should do now?

The article in the first link of yours has a tag, "VBScript," which I assume you need Visual Basic or something.

The second link looks like it's written in something called "regular expressions." I've never heard of it, but there are links all over the site that tell you what tools you would need:

Spoiler :
These tools and utilities have regular expressions as the core of their functionality.

grep - The utility from the UNIX world that first made regular expressions popular

PowerGREP - Next generation grep for Microsoft Windows

RegexBuddy - Learn, create, understand, test, use and save regular expressions. RegexBuddy makes working with regular expressions easier than ever before.

RegexMagic - Generate regular expressions using RegexMagic's powerful patterns instead of the cryptic regular expression syntax.

The third one, Parse-o-matic or whatever, has a link right at the top, it says "installing and running a script."

I'm not going to bother with the other two links of yours. I have a feeling each link will have links to tutorials and how-to's. Dunno what you're confused about :confused:
 
My Google Chrome browser isn't working properly...
Sometimes when I opened the browser it displayed a message "C:/Documents and Settings/(my name)/Application Data/Google/Chrome/Default is corrupt. Run the Chkdsk utility."
Or something like that.
It still does work, but even after I reinstalled it (losing almost all of my favorites :(), it still displayed the message. I'll try to get a screenshot of it and edit this.
Oh, and I already ran the Chkdsk utility and checked the file, scanning it, but the utility just completed with no cautions and there was no report of infection from avast antivirus.
I'm still using Chrome right now, but how do I fix this?
(Please, no responses of "get firefox")
 
"Corrupt File"
"Download location constantly being corrupted"

I haven't read these threads yet, but I wanted to post them quick while you were still online :)
I'll browse through 'em, but it might be faster if you do
Thanks. Apparently it's with downloads, so I suppose it's nothing harmful...a work-around is to move the folder to download into to another one, like D:\...
Although this is not a solution, I see that the Chrome employees are working on it, and other people are experiencing it too...
Thanks again! :D
 
Thanks about the scripting stuff..

Now heres another question. I just found this old screenshot from my Windows 98 computer. It shows Norton Antivirus (my mom refused to use another ...) badly malfunctioning. The computer was clean at the time, since I remember installing another A/V behind her back and scanning and it came out clean and then I uninstalled it. What would cause this?

inabitoftrouble.jpg


EDIT: I just remembered my mom did wipe the computer but not before I got this pic onto a floppy disk. It's clean! (I also just remembered somebody accusing me of giving them a virus when I showed them the screenshot and the story behind it...)
 
So you're asking a question about a computer you don't have, from a situation a long time ago, that you don't really have much chance of coming across again? We'll just call it cosmic rays and move on.
 
I think I did something wrong here. I was trying to use this script I figured out it wasn't Visual Basic but some HTML thing. I looked up how to do it and got this.

So heres what I did:
1. Created a test text file (consisting of the same two lines repeated over and over) and a new HTML file in C:\Scripts.
2. Put this into the HTML file:
Code:
<html>
<body>

<script type="text/vbscript">
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adCmdText = &H0001

Set objConnection = CreateObject("ADODB.Connection")
Set objRecordSet = CreateObject("ADODB.Recordset")

strPathToTextFile = "C:\Scripts\"
strFile = "Test.txt"

objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
      "Data Source=" & strPathtoTextFile & ";" & _
          "Extended Properties=""text;HDR=NO;FMT=Delimited"""

objRecordSet.Open "Select DISTINCT * FROM " & strFile, _
    objConnection, adOpenStatic, adLockOptimistic, adCmdText

Do Until objRecordSet.EOF
    Wscript.Echo objRecordSet.Fields.Item(0).Value   
    objRecordSet.MoveNext
Loop
strPathToTextFile = "C:\Scripts\"
strFile = "Test.txt"

Do Until objRecordset.EOF
    Wscript.Echo objRecordset.Fields.Item(0).Value   
    objRecordset.MoveNext
Loop
</script>

</body>
</html>

(I will not put the text file here as it consists entirely of words that would be censored. Dont ask)

3. Opened the HTML file in Internet Exploder (as apparentlly VBScript is IE only).

Nothing happened, I checked. I figured I did something wrong in the HTML portion but I didn't get any errors, just a blank screen.
 
This works well for SD Cards?

Yeah, it supports SD cards... I used it on my XD card (those are not as common, I think) and it worked. The important thing is to not put anything new onto the card until you get the old files off.
 
While Im still trying to figure out the duplicate line thing, here's another quick question: Is it possible to "SendTo" a batch file to perform some function on a file? (Specifically I want to create a shortcut and then move the shortcut to the Start Menu -- this is for portable applications).

Dont tell me how to create the batch file (I want to try and figure that out myself), just tell me if its possible under Vista. (I'm pretty sure it was possible under 9x, but Im not so sure on Vista. This post seems to incidate its not).
 
I think you're trying to go about this the wrong way. You want to have a batch file on your flash drive that you run to create a shortcut to the start menu, right? Sounds to me like you're trying to over engineer the problem. I'd have a short already created in the folder, and have the batch file copy it to the user data start menu.

If you're wanting to do this with any portable app, instead of a specific one, you'd have to drop down to the command line in order to had off the variable data. That makes it slightly more complex, but still relatively doable.

I've given you enough key words that google should be helpful. But when you're looking, make sure you specify 'environment variables'.
 
Well I tried looking to see if there was a function similar to "Send to Desktop (Create Shortcut)" but there didn't seem to be. When I create a shortcut and I added a shortcut to the Start Menu onto the SendTo menu it created a copy and didn't delete the original. So I thought about using a batch file.

Also its not my flash drive, its the D:/PortableApps folder.

Id have to do the googling after I come back from school (some sort of gradualation assembly...) Thanks.
 
I was looking for how to delete duplicate lines from a text file and I found quite a few scripts but Im not sure how to use these scripts. Can somebody tell me what I should do now?

Why don't you do it in python or perl? You'll learn a much more useful and platform independent language this way.

If you are not sure how to do it, try to break down your problem:

0. Pick a language. Python is probably a better idea, even though Perl is slightly more suitable for the task.
1. Get a basic idea of the language: google python tutorial
2. Find out how to read and write files: google python file io
3. Store all lines for the file in an array
4. Iterate through the array and check for duplicates
(there are better ways to handle the problem, but you first need to master the basics)
 
If it's from the official python site, probably. ;)

Of course, it's only helpful if it teaches you what you want to know. That's why you try things out, and keep looking when the first look doesn't pan out.
 

You have to decide that... i have no idea what prior knowledge of programming you have.
It looks very thorough and seems to teach you bit by bit, which is good if you are not very familiar with all the relevant programming concepts. Just look at a few tutorials and stick with the one you like best...

If you already know a lot, you could just look at example scripts and use the reference for the rest. But if you did, i wouldn't have to tell you this. ;)
 
Not much background... a tiny bit of BASIC (I'll admit its pretty useless)The tutorial seems to make a lot of sense though. I googled "python remove duplicate lines" and found some code snippets which Ill use.
 
OK I think Im learning. Now a Gmail question:
I used to use this script to show unlabeled emails in Gmail. Now it just makes a search box pop up.

So I tried the -label:{label1, label2, "label with multiple words"} but messages that do have labels still show up. I also tried putting in -label:label1, -label:"label with multiple words" but that gave no results.

Does anybody had any other suggestions? I am using Thunderbird (mainly to delete a lot of old attachments) but I didn't really see anything there. (Its hard to tell from the All Mail view in Thunderbird if a message is labelled). I also didn't get too much in google.(I also looked at Thunderbird addons but didnt see much. I dont really need to sync my contacts).

I also did search for more updated versions of the addon, the one I linked to seems to be the newest.
 
I have had an email account for many years without having problems with SPAM mails. However, in the last few days the SPAM mails are flooding in, approximately 50 per day. What could have caused this and is there any way to stop it?

Thanks to anyone who can shed some light on this.

Scratcher
 
Back
Top Bottom