Search found 9 matches

by kocchB
Thu Sep 27, 2012 7:51 am
Forum: VBScript
Topic: Search a string in a text file. If it does not exist add it to the file.
Replies: 3
Views: 5085

Search a string in a text file. If it does not exist add it to the file.

Yep your script does the job. It adds the string on existing ini files that did not have it prior. I edited some of them and noticed a space between lines how to you remove the space to have the content looks like net use Q: Server1Share1 net use R: Server2Share2 net use * ServerNameShareName instea...
by kocchB
Thu Sep 27, 2012 5:51 am
Forum: VBScript
Topic: Search a string in a text file. If it does not exist add it to the file.
Replies: 3
Views: 5085

Search a string in a text file. If it does not exist add it to the file.

I have a group of ini files that call procedures. The ini file name is based on the user logon ID. For example: UserID1.ini UserID2.ini UserID3.ini ..... The path of the ini files is c:ini files I also have a text file named usernames.txt populated with user logon ID(s). The content of usernames.txt...
by kocchB
Fri Apr 20, 2012 4:01 pm
Forum: Windows PowerShell
Topic: How To Know Last Used Date Time Of Any Apps in W
Replies: 2
Views: 2333

How To Know Last Used Date Time Of Any Apps in W

I found the script below. I would like to know how to list the last Used Date and Time of an application installed in Windows XP / 7 using Powershell.

$a = New-Object -comobject Excel.Application $a.visible = $True $b = $a.Workbooks.Add() $c = $b.Worksheets.Item(1) $c.Cells.Item(1,1) =
by kocchB
Fri Jul 17, 2009 9:05 am
Forum: Windows PowerShell
Topic: Get-acl to list folder permissions...
Replies: 3
Views: 7566

Get-acl to list folder permissions...

Hi falle,What parts of the access do you want to list? The "Access" column that get-acl outputs, by default, is a collection of access rules that have these properties (sample):AccessControlType: AllowFileSystemRights: FullControlIdentityReference: BUILTINAdministratorsInheritanceFlags: ContainerIn...
by kocchB
Fri Jul 17, 2009 12:39 am
Forum: Windows PowerShell
Topic: Get-acl to list folder permissions...
Replies: 3
Views: 7566

Get-acl to list folder permissions...

Get-acl c:Windows will get me the result below I have a list of folders in a text file. The each folder name has a space. For example: Common Document. Get-acl c:Common Document generate an error. 1/ How is the correct command to get the ACL of the folder. 2/ How do you write a PS code to read the t...
by kocchB
Fri Jul 17, 2009 12:39 am
Forum: Windows PowerShell
Topic: Get-acl to list folder permissions...
Replies: 3
Views: 7566

Get-acl to list folder permissions...

Get-acl c:Windows will get me the result below I have a list of folders in a text file. The each folder name has a space. For example: Common Document. Get-acl c:Common Document generate an error. 1/ How is the correct command to get the ACL of the folder. 2/ How do you write a PS code to read the t...
by kocchB
Tue Jul 07, 2009 12:51 pm
Forum: VBScript
Topic: Search drive for a given folder. If found Rename.
Replies: 4
Views: 1360

Search drive for a given folder. If found Rename.

Hello AbqBill, I do not know JScript. But When I copied and pasted your code to primalscript , it all came in one line. I was able to get the script working: ---------------------------------------------------------------------------------------------- Set FSO = CreateObject("Scripting.FileSystemObj...
by kocchB
Fri Jul 03, 2009 4:09 pm
Forum: VBScript
Topic: Search drive for a given folder. If found Rename.
Replies: 4
Views: 1360

Search drive for a given folder. If found Rename.

[quote] What is wrong with just asking for it by name?   ShowSubfolders FSO.GetFolder(" z:user1DataMydocs ") Each folder on the root of the z drive represent the users personal folders. There are more than 300 of them. I need to search each of them. If I find a folder that has in his path " DataMydo...
by kocchB
Thu Jul 02, 2009 3:23 pm
Forum: VBScript
Topic: Search drive for a given folder. If found Rename.
Replies: 4
Views: 1360

Search drive for a given folder. If found Rename.

Hello,I need help to write a script that will perform the following task:1/ Search a drive for a given sub folder named "Mydocs"2/ If the sub folder is found rename it "Mydocsold"3/ Document the execusion of the script on a log file that record starting date and time of the script. When the script f...