Welcome to TechNet Blogs Sign in | Join | Help

Browse by Tags

All Tags » dictionary objects and arrays   (RSS)

Hey, Scripting Guy! How Can I Parse My Firewall Log File to See What Kind of Packets Are Being Sent?

Hey, Scripting Guy! I would like to parse the firewall log on my computer and find out the kinds of packets that are going out. You know, how many Web page packets, how many DNS lookups, how many pings. That kind of stuff. I figure that I can look at

Hey, Scripting Guy! Quick-Hits Friday: The Scripting Guys Respond to a Bunch of Questions (03/27/09)

Determining if SQL Is Installed; How to Read Paired Information into a Dictionary Object Hey, Scripting Guy! Being an avid reader of your columns for the last several years has been a blast. I wrote you once before but with no success (in terms of a reply,

Hey, Scripting Guy! Quick-Hits Friday: The Scripting Guys Respond to a Bunch of Questions (01/23/09)

How Can I Return File Names of Files Created in Less Than an Hour from the Current Time? Hey, Scripting Guy! I am attempting to write a script that looks at the creation dates of all files in a certain directory. If the files were created less than an

Hey, Scripting Guy! How Can I Store Arrays Within Another Array?

Hey, Scripting Guy! I need to read in data from a text file and store each line as a separate item in an array. However, the data in each line must also be stored as an array; in other words, I need an array made up of other arrays. I tried creating a

Hey, Scripting Guy! How Can I Import a Fixed-Width Data File into Microsoft Excel?

Hey, Scripting Guy! How can I import a fixed-width data file into Microsoft Excel? -- RS Hey, RS. This column is being written on a Friday morning, and so far it’s been a very weird morning at that. For one thing, it’s not raining and – if you look closely

Hey, Scripting Guy! How Can I Remove Duplicate Values From a Pair of Text Files?

Hey, Scripting Guy! I have two text files that contain numbers. I need to write a script that can determine whether a given number exists in both of these text files. If it does, I need to delete that line from each of the two files. How do I do that?

How Can I Replace Null Values in an Array?

Hey, Scripting Guy! How can I loop through a 12x12 array and replace any null values with a hyphen? -- AM Hey, AM. Sorry for the delay in getting back to you; as it turns out, yesterday was Independence Day (more typically referred to as the Fourth of

How Can I Delete Duplicate Items From an Array?

Hey, Scripting Guy! How can I delete duplicate items from an array? -- WR Hey, WR. You know, if Microsoft has a weakness – and we’re not saying that it does, we’re just saying if it does – it’s this: we never make mistakes. (What’s that? What about Windows

How Can I Verify That All the Items in a List Also Appear in Another List?

Hey, Scripting Guy! I have a dumb question for you: If I have two lists how can I verify that all the items in list 2 can be found in list 1? -- SS Hey, SS. Trust us; we’ve heard sillier questions. For example, awhile back the Scripting Son came downstairs

How Can I Get the Names of 10 Randomly-Selected Files in a Folder?

Hey, Scripting Guy! How can I get the names of 10 randomly-selected files in a folder? I need to do that so I can test and verify our backup and restore policies. -- CS Hey, CS. You know, if you’re interested in things that are random, haphazard, arbitrary,

How Can I Test a Dynamic Array to See if the Array is Empty?

Hey, Scripting Guy! How can I test a dynamic array to see if the array is empty? -- SH Hey, SH. Today’s column is dated Wednesday, July 5 th . If there really is a column today that means that, unlike last year, the neighbors and their errant fireworks

How Can I Import a Fixed-Width File into Microsoft Excel?

Hey, Scripting Guy! How can I import a fixed-width file into Microsoft Excel? -- JP Hey, JP. We have a confession to make here, something we’re terribly ashamed of: for a moment - just for a moment, mind you - we doubted Microsoft Excel. Yes, we know:

How Can I Build an Array from a Column of Data in Excel?

Hey, Scripting Guy! How can I build an array from a column of data in Excel? -- AH Hey, AH. Obviously none of the Scripting Guys has any need to go on a diet (perish the thought!), but we do know that one time-honored dieting strategy is the theory of

How Can I Determine the Number of Items Generated by the Split Function?

Hey, Scripting Guy! I know I can use the Split function to split a line into individual items. But how can I tell how many “splits” I ended up with; that is, how many individual items did I generate from a single line? -- SA Hey, SA. For those of you

Can I Read a Text File From the Bottom Up?

Hey, Scripting Guy! I have a log file in which new data is appended to the bottom of the file; that means the most recent entries are at the end of the file. I’d like to be able to read the file starting with the last line and then ending with the first
 
Page view tracker