Search found 14 matches

by operez
Tue Feb 05, 2013 4:18 am
Forum: PowerShell
Topic: Copy sections from a text file out to another text file
Replies: 4
Views: 3386

Copy sections from a text file out to another text file

Looked at the examples and one came close, the -context. But I don't know how many lines to capture after the match, because they vary. It could be 5 lines or 25 or 36 lines that I need to copy before I run into the second set of keywords.
by operez
Tue Feb 05, 2013 2:10 am
Forum: PowerShell
Topic: Copy sections from a text file out to another text file
Replies: 4
Views: 3386

Copy sections from a text file out to another text file

When using Get-Content of a text file are the lines indexable (is that a word)? Can I use a counter to count each line read, so that when I come to my first *keyword* on line 5, I start copying line (6) and (7) until I come to the next set of key words *this* or *that* where I stop copying lines and...
by operez
Tue Feb 05, 2013 12:01 am
Forum: PowerShell
Topic: Copy sections from a text file out to another text file
Replies: 4
Views: 3386

Copy sections from a text file out to another text file

I'm new to powershell, but I need to read a text file and copy sections out to another text file. I need to read the first text file line by line until I come to a specific word, (like 'keyword') then starting with the next line copy each line read to another text file until I come to another set of...
by operez
Mon Jan 14, 2013 3:53 am
Forum: VBScript
Topic: Deleting an expired shortcut from several remote workstations
Replies: 3
Views: 5028

Deleting an expired shortcut from several remote workstations

Thank you. That seems to have worked.
by operez
Fri Jan 11, 2013 12:21 am
Forum: VBScript
Topic: Deleting an expired shortcut from several remote workstations
Replies: 3
Views: 5028

Deleting an expired shortcut from several remote workstations

I need to delete an expired shortcut icon from several remote computers. I will be reading a text file with each workstation’s IP address and performing the following function. To test my logic I was running this script with just one IP address, but it doesn’t seem to find anything, even though if I...
by operez
Thu Jan 26, 2012 8:42 am
Forum: VBScript
Topic: Move files from one folder to another
Replies: 4
Views: 3646

Move files from one folder to another

Thanks jvierra, I have the FileExist and Move down, it's the logic to check if I already have a renamed file in the Target folder and figuring out the version number so that I can increment the file number. Example, if FileName(4).ext already exit, rename the next one FileName(5).ext Hope someone ca...
by operez
Wed Jan 25, 2012 7:01 am
Forum: VBScript
Topic: Move files from one folder to another
Replies: 4
Views: 3646

Move files from one folder to another

I need to move files from one folder to another, but I want to check to see if the file already exist in the new folder and if it does, I want to rename the file before I move it, so that I have all copies of that file. I plan on moving each file to a folder name based on the file's extension. All ...
by operez
Wed Jan 25, 2012 7:01 am
Forum: VBScript
Topic: Move files from one folder to another
Replies: 4
Views: 3646

Move files from one folder to another

I need to move files from one folder to another, but I want to check to see if the file already exist in the new folder and if it does, I want to rename the file before I move it, so that I have all copies of that file. I plan on moving each file to a folder name based on the file's extension. All ...
by operez
Tue Aug 16, 2011 7:23 am
Forum: VBScript
Topic: Color every other line in Excel
Replies: 1
Views: 1374

Color every other line in Excel

I put together a wsf script to list all the published apps in my Citrix farm and output the results to an Excel spreadsheet. I later added logic to color every other line, for readability, from examples on the web. When I used ActiveCell.EntireRow, it worked perfectly. But, I only wanted to color t...
by operez
Tue Aug 16, 2011 7:23 am
Forum: VBScript
Topic: Color every other line in Excel
Replies: 1
Views: 1374

Color every other line in Excel

I put together a wsf script to list all the published apps in my Citrix farm and output the results to an Excel spreadsheet. I later added logic to color every other line, for readability, from examples on the web. When I used ActiveCell.EntireRow, it worked perfectly. But, I only wanted to color t...