come on another separate post in the vbscript forum?
for example a family tree related csv
Import-csv yourfile.csv|select person, surname, given, gender|sort gender, surname,given|export-csv newfile.csv
open the csv in xl or rename it to xls..etc
CSVs are just text files. If you need this in xls/xlsx format, and can't do this via the web application, and dont have XL installed. Yes I think Powershell is the best approach for this.
Import the CSV in PoSh, or get content, sort-object by said column headers, export csv or out file or...
where are your errors?
I'm pretty sure *.txt makes no sense here.
FSO.CopyFile &Folder &"\" &FileName &"*.txt", &Folder &"\" &FileName &".txt"
You have to enumerate those yourself. That command literally just copies files, it doesn't have context to what files are in the folder you are in.
Did you update this script for the post? I'm not familiar with KACE and been quite a while since I played in vbscript, but you may want to check LDAP approaches as well.
Or this the real code? Cause GetObject("WinNT://./Administrators") the . needs to be parse for differnt names, where '.' is...
Check out Link
There is frankly a bunch of weird things in your example.
You can't use .run the way you are to call a function.
findFolder(strDir, strFlag1) & "\strflag2"
How does strflag2 come into play at all?
http://office.microsoft.com/en-us/excel-help/creating-custom-functions-HA001111701.aspx
Public Function ConvertForGraph(theValue)
If InStr(1, theValue, "<1", vbBinaryCompare) > 0 Then
ConvertForGraph = 0
ElseIf InStr(1, theValue, "TNTC", vbBinaryCompare) > 0 Then
ConvertForGraph =...
There a ton of other free renaming tools that will accomplish what you are trying to do much faster/easier and more robustly. Where you can create rules/macros..etc than a custom script.
You can not rewrite the name of the file object in this manner. You would need to 'move' this file from a.txt...
Jeepix how are you doing this vbscripting? Are you using any IDE at all? I think you could save yourself a lot of this heartache
I'd suggests VBSedit, just to get a base, with some samples loaded and an object broswer. It has a trial version.
...and settings'
Also not sure if all users have permissions for the WMI calls.
Also 5-10 mins....seems like a LONG time.
If you know what you want from the WMI queries, query them instead of SELECT * and then filtering, you're pulling a lot of extra information you apparently don't care for.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.