Need wild card command to export multiple csv files for software inventories list
I have a powershell script that does software inventories and then export into a csv file. now the problem is if i were to do this on multiple machine and point the path to a network share it will replace the olde csv file since the csv file has a same name
and i will end up having only one computer software inventories instead of multiple ones.
here's the string
Get-WmiObject win32_Product | Select Name,Version,PackageName,Installdate,Vendor | Sort InstallDate -Descending| Export-Csv P:\test\inventorries.csv
is there a way i can use a wild card to name these files in a sequential order? i have tried *.csv but no luck
How about adjusting the filename to include the machine hostname.
Get-WmiObject win32_product |Select Name,Version,PackageName,Installdate,Vendor | Sort InstallDate -Descending | Export-Csv -Path ('p:\test\inventory_' + (hostname) + '.csv')
Similar Messages
-
Issue when I upload CSV file for insert contact list on Cisco Attendant Console Advanced
Hi Friends,
I have error "Provided file is not valid CSV File" when I upload CSV file to Cisco Attendant Console Advanced system. I'm not sure what happen about my CSV. My purpose is insert contact list to system and create CSV base on documentation.
Anyone have idea to solve this issue please kindly help me.
ThanksYou are right, whenever Cisco device boots, the IOS files gets loaded on the DRAM.
But in this process, some temporary files are also generated which gets saved in the flash/Disk, that’s the only reason you got these error messages. It’s not recommended at all to have less space in the Flash than what is recommended on Cisco.com. I would say please remove some files from Disk and have minimum 256 MB flash otherwise your router may drop into rommon mode at the time of next reload.
Well, it’s good to upgrade the bootstarp image too. Currently you are running 15.X IOS code, I would say run 15.X bootstarp image on the box.
You may download bootstarp image for 7206VRX NPEG2 from the link below:-
http://software.cisco.com/download/release.html?mdfid=282188585&flowid=1380&softwareid=280805685&release=15.2.4S4&relind=AVAILABLE&rellifecycle=ED&reltype=latest
If you want to know the procedure of the upgrade, click the link mentioned below:-
http://www.cisco.com/en/US/docs/ios/12_2/configfun/command/reference/frf010.html#wp1017654
-Amant -
HT2486 how can I export the contact book data to a csv file for editing?
how can I export the contact book data to a csv file for editing?
You can edit a card right in Contacts. No need to export and re-import.
Select a name and on the right side, click the Edit button: -
External Table which can handle appending multiple csv files dynamic
I need an external table which can handle appending multiple csv files' values.
But the problem I am having is : the number of csv files are not fixed.
I can have between 2 to 6-7 files with the suffix as current_date. Lets say it will be like my_file1_aug_08_1.csv, my_file1_aug_08_2.csv, my_file1_aug_08_3.csv etc. and so on.
I can do it by following as hardcoding if I know the number of files, but unfortunately the number is not fixed and need to something dynamically to inject with a wildcard search of file pattern.
CREATE TABLE my_et_tbl
my_field1 varchar2(4000),
my_field2 varchar2(4000)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY my_et_dir
ACCESS PARAMETERS
( RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL )
LOCATION (UTL_DIR:'my_file2_5_aug_08.csv','my_file2_5_aug_08.csv')
REJECT LIMIT UNLIMITED
NOPARALLEL
NOMONITORING;Please advice me with your ideas. thanks.
Joshua..Well, you could do it dynamically by constructing location value:
SQL> CREATE TABLE emp_load
2 (
3 employee_number CHAR(5),
4 employee_dob CHAR(20),
5 employee_last_name CHAR(20),
6 employee_first_name CHAR(15),
7 employee_middle_name CHAR(15),
8 employee_hire_date DATE
9 )
10 ORGANIZATION EXTERNAL
11 (
12 TYPE ORACLE_LOADER
13 DEFAULT DIRECTORY tmp
14 ACCESS PARAMETERS
15 (
16 RECORDS DELIMITED BY NEWLINE
17 FIELDS (
18 employee_number CHAR(2),
19 employee_dob CHAR(20),
20 employee_last_name CHAR(18),
21 employee_first_name CHAR(11),
22 employee_middle_name CHAR(11),
23 employee_hire_date CHAR(10) date_format DATE mask "mm/dd/yyyy"
24 )
25 )
26 LOCATION ('info*.dat')
27 )
28 /
Table created.
SQL> select * from emp_load;
select * from emp_load
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
SQL> set serveroutput on
SQL> declare
2 v_exists boolean;
3 v_file_length number;
4 v_blocksize number;
5 v_stmt varchar2(1000) := 'alter table emp_load location(';
6 i number := 1;
7 begin
8 loop
9 utl_file.fgetattr(
10 'TMP',
11 'info' || i || '.dat',
12 v_exists,
13 v_file_length,
14 v_blocksize
15 );
16 exit when not v_exists;
17 v_stmt := v_stmt || '''info' || i || '.dat'',';
18 i := i + 1;
19 end loop;
20 v_stmt := rtrim(v_stmt,',') || ')';
21 dbms_output.put_line(v_stmt);
22 execute immediate v_stmt;
23 end;
24 /
alter table emp_load location('info1.dat','info2.dat')
PL/SQL procedure successfully completed.
SQL> select * from emp_load;
EMPLO EMPLOYEE_DOB EMPLOYEE_LAST_NAME EMPLOYEE_FIRST_ EMPLOYEE_MIDDLE
EMPLOYEE_
56 november, 15, 1980 baker mary alice 0
01-SEP-04
87 december, 20, 1970 roper lisa marie 0
01-JAN-99
SQL> SY.
P.S. Keep in mind that changing location will affect all sessions referencing external table. -
Import from dsv files and export to csv files
hi every body..
how can I create a project in NetBeans which does:
1- import a .dsv (Delimiter-Separated Values) file content and save it to array
- the values in this format separated by fixed commas
example
"AIG" "Insurance" "64.91" "25/11/06"
2- export into .csv file (Comma Separated Value)
-the values in this format separated by commas
example:
AIG,Insurance,64.91,25/11/06Well, you need to learn Java so you can read files, divide the data by the delimiters, and then write it out as a csv file.
Can't really give better instructions than that...maybe start by reading the basic tutorials?
We don't give out full program code here so you'll need to ask more precise questions. Such as what is it that you're having problems with. -
Data modeler, error when exporting to csv files
hi, i have a relational model and i need to export this model to csv files, when exporting the model it errors,
displaying the following error nmessage:
Oracle SQL Developer Data Modeler Version: 2.0.0 Build: 584
Oracle SQL Developer Data Modeler Export Log
Date and Time: 2010-09-21 15:17:17
Design Name: Diagram
Model Name: CSV
Export Finished
Errors: 1
Warnings:0
<<<<< ERRORS >>>>>
java.lang.NullPointerException
the issue is a file is missing when exporting proccess is done, the file is DM_CommentsRDBMS.csv, this file contains the commens of columns.
Thanks.Hi,
I logged bug however information is not enough to locate the problem.
You can use export to reporting schema in order to get your model exported - in database in that case.
We are not going to extend "export to CSV file" functionality any further - it'll be as it is now.
Philip -
Script to merge multiple CSV files together with no duplicate records.
I like a Script to merge multiple CSV files together with no duplicate records.
None of the files have any headers and column A got a unique ID. What would be the best way to accomplish that?OK here is my answer :
2 files in a directory with no headers.
first column is the unique ID, second colomun you put whatever u want
The headers are added when using the import-csv cmdlet
first file contains :
1;a
2;SAMEID-FIRSTFILE
3;c
4;d
5;e
second file contains :
6;a
2;SAMEID-SECONDFILE
7;c
8;d
9;e
the second file contains the line : 2;b wich is the same in the first file
the code :
$i = 0
Foreach($file in (get-childitem d:\yourpath)){
if($i -eq 0){
$ref = import-csv $file.fullname -Header id,value -Delimiter ";"
}else{
$temp = import-csv $file.fullname -Header id,value -Delimiter ";"
foreach($line in $temp){
if(!($ref.id.contains($line.id))){
$objet = new-object Psobject
Add-Member -InputObject $objet -MemberType NoteProperty -Name id -value $line.id
Add-Member -InputObject $objet -MemberType NoteProperty -Name value -value $line.value
$ref += $objet
$i++
$ref
$ref should return:
id
value
1
a
2
SAMEID-FIRSTFILE
3
c
4
d
5
e
6
a
7
c
8
d
9
e
(get-childitem d:\yourpath) -> yourpath containing the 2 csv file -
Appending multiple *.csv files while retaining the original file name in the first column
Hi guys it's been awhile.
I'm trying to append multiple *.csv files while retaining the original file name in the first column, the actual data set is about 40 files.
file a.csv contains:
1, line one in a.csv
2, line two in a.csv
file b.csv contains:
1, line one in b.csv
2, line two in b.csv
output.csv result is this:
I would like this:
a.csv, 1, line one in a.csv
a.csv, 2, line two in a.csv
b.csv, 1, line one in b.csv
b.csv, 2, line two in b.csv
Any suggestions to speed up my hobbling attempts would be aprieciated
Thanks,
-SS
Solved!
Go to Solution.What you could do is given in the attachment.
Started with 2 files :
a.csv
copy of a.csv
Both with data :
1;1.123
2;2.234
3;3.345
Output :
a.csv;1;1.123
a.csv;2;2.234
a.csv;3;3.345
Copy of a.csv;1;1.123
Copy of a.csv;2;2.234
Copy of a.csv;3;3.345
If you have more questions, just shoot
Kind regards,
- Bjorn -
Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's
LabVIEW 5.1 - LabVIEW 2012
Attachments:
AppendingCSV.JPG 73 KB -
Is it possible to export a CSV file in stead of a XLS file in WDA ALV?
I know the user can change the file type themselves. But it would be better to export a CSV file directly. Do you have any suggestion?
Many thanks!Refer this thread : Re: How Export to CSV format from WDA
May be it helps you. -
Multiple CSV files into single Excel as multiple spreadsheets
Hi Experts,
Can any one please help on the below requirement
Requirement:
I have three .csv files for example (CSV_file1.csv, CSV_file2.csv, CSV_file3.csv,). I want to load these three different files into one Excel file as three different spreadsheets. As I know we don't have flexibility to load data into Excel file, Can any one help me out on thisThere are several posts and documents in this forum that may address your case. Try
An approach to build Target file in Excel format in SAP BODS using XSL or Excel as a Target using Data Services 4.2 or Excel target in BODS 4.1 as a starting point. -
Need to take a value from the csv file and query in a OAF page.
Hello,
I have a requirement to take the list of employee numbers in a csv file and display its corresponding job on the page.
I have created a item 'MessageFileupload' where the user will upload the csv file containing the employee number and a Button 'Display Jobs' which will display the corresponding jobs on the page.
Any idea how to take the values from the csv file and query it?
Regards,
den123.Hi ,
Check
http://oraclearea51.com/contribute/post-a-blog-article/csv-file-upload-for-oa-framework.html
http://www.roseindia.net/jsp/upload-insert-csv.shtml
Below code works from above blogs.
package xx.oracle.apps.pa.Lab.webui;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
// import java.io.*;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.server.OAViewObjectImpl;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.jbo.domain.BlobDomain;
import oracle.cabo.ui.data.DataObject;
import oracle.jbo.Row;
* Controller for ...
public class deptCsvUploadCO extends OAControllerImpl
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
// Code Addition Started for CSV upload
OAApplicationModule am = (OAApplicationModule) pageContext.getApplicationModule(webBean);
OAViewObjectImpl vo = (OAViewObjectImpl) am.findViewObject("deptCsvVO1");
//if ("GoBtn".equals(pageContext.getParameter(EVENT_PARAM)))
if (pageContext.getParameter("GoBtn") != null)
System.out.println("Button Pressed");
DataObject fileUploadData =(DataObject)pageContext.getNamedDataObject("FileUploadItem");
String fileName = null;
String contentType = null;
Long fileSize = null;
Integer fileType = new Integer(6);
BlobDomain uploadedByteStream = null;
BufferedReader in = null;
try
fileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");
contentType =(String)fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");
uploadedByteStream = (BlobDomain)fileUploadData.selectValue(null, fileName);
in = new BufferedReader(new InputStreamReader(uploadedByteStream.getBinaryStream()));
fileSize = new Long(uploadedByteStream.getLength());
System.out.println("fileSize"+fileSize);
catch(NullPointerException ex)
throw new OAException("Please Select a File to Upload", OAException.ERROR);
try{
//Open the CSV file for reading
String lineReader="";
long t =0;
String[] linetext;
while (((lineReader = in.readLine()) !=null) )
//Split the deliminated data and
if (lineReader.trim().length()>0)
System.out.println("lineReader"+lineReader.length());
linetext = lineReader.split(",");
t++;
//Print the current line being
if (!vo.isPreparedForExecution())
vo.setMaxFetchSize(0);
vo.executeQuery();
System.out.println("Trimmed "+ linetext[1].replace("\"", ""));
Row row = vo.createRow();
row.setAttribute("Deptno", linetext[0].trim());
row.setAttribute("Dname",linetext[1].trim().replace("\"", ""));
row.setAttribute("Loc",linetext[2].trim().replace("\"", ""));
//row.setAttribute("Column4", linetext[3].trim());
vo.last();
vo.next();
vo.insertRow(row);
catch (IOException e)
throw new OAException(e.getMessage(),OAException.ERROR);
//else if (pageContext.getParameter("Upload") != null)
am.getTransaction().commit();
throw new OAException("Uploaded SuccessFully",OAException.CONFIRMATION);
}Thanks,
Jit -
CSV file for users who have one-time password email address
Hi Guys,
I am trying to extract the list of users who have one-time password email address in FIM or users who have registered with one-time password reset authentication workflow. I need to get their email addresses in CSV file.
Regards
Sarwar
SarwarTake a look at:
http://social.technet.microsoft.com/wiki/contents/articles/3616.how-to-use-powershell-to-export-all-users-who-have-registered-for-self-service-password-reset-sspr.aspx
The script queries a WorkFlow called "Password Reset AuthN Workflow" and returns its ObjectID, then uses it to do a new query searching for "Users" with these parameters:
AuthN WorkFlow Registered = ObjectID of "Password Reset AuthN Workflow"
The script exports these details to a CSV.
Also, all OTP email addresses should be stored in the "msidmOneTimePasswordEmailAddress" attribute in the FIM Portal. -
Multiple indesign files for product brochure one data merge file
I have multiple indesign files for product brochure and there are price changes for various products.
attached is a screen shot of the folder where all the indesign files are located as you can see each one has been laid out as a spread.
Rather than opening each individual indesign file to amend prices can i quickly? or is there a way of compliling all documents into one file and quickly updating the price with the data merge file.
thanks in advance.Absolutely not.
(1) PDF/VT-1 files must also be PDF/X-4 files. The “create PDF via distillation of PostScript” method precludes this since PostScript supports neither live transparency nor color management.
(2) The efficiencies of PDF/VT-1 require use of Forms XOjects and Image XObjects in the PDF file. That requires direct PDF creation that you get from PDF export. This is not available via any route that uses stink'in PostScript as an intermediary.
(3) Adobe most strongly endorses PDF creation from InDesign via the export function, not printing to PostScript and distilling. Such PostScript is optimized strictly for printing and not for PDF file creation.
- Dov -
Csv files for OBIA procurement and spend analytics
hi,
which csv files we need to configure in order to install OBIA 7.9.6.3 procurement and spend analytic for EBS R12 1 3 as source?
In documentation, oracle given set of files for 11i & R12? do we need to configure csv files for both version ???
As per documentation,counter files for , CSV files req for source as 11i are not there in R12???
please guide???Hi,
To be safe, configure all of the domain value files documented in the section http://docs.oracle.com/cd/E20490_01/bia.7963/e19039/configsupplychain.htm#CACIEBBH
Do this regardless of whether they state 11i or R12 in the filename. Some of the files have not changed from 11i adapters, so the filenames have not been updated e.g. domainValues_Employee_Expense_Type_ora11i.csv
Please mark if helpful / correct,
Andy
www.project.eu.com -
How to search a .csv file for data using its timestamp, then import to labview
Hi, I'm currently obtaining density, viscosity and temperature data from an instrument, adding a timestamp and writing it to a .csv file which I can view in Excel. This works fine (see attached code) but what I need to do now is to search that csv file for data which was obtained at a certain time, import the temperature, density & viscosity values at this time back into Labview to do some calculations with them, while the data acquisition process is still ongoing.
I've found various examples on how to import an entire csv file into labview, but none on how to extract data at a specific time. Also, whenever I try to do anything with the .csv file while my data acquistion VI is running, I receive error messages (presumably because I'm trying to write to and import data from the .csv file simultaneously). Is there some way around this, maybe using case structures?
If you need to know my skill level, I've been using Labview for a few weeks and prior to that have basically no experience of writing code, so any help would be great. Thanks!
Solved!
Go to Solution.
Attachments:
Lemis VDC-30 read registers MODBUS v5.vi 56 KBIt sounds as if you are going about this a little backwards writing to a data file and then extracting from the file but its the weekend so I can't think of an improved way to do it at the moment.
Searching for a specific time with those specific values is quite easy, or if you wanted to select any time then you could interpolate the values to find any value that you want (This is where the contiguous measurement comes in, as you have readings at discrete times you will have to interpolate the values if you want to get the 'measured value' at a time point that is not exactly one of your measured points).
If you can extract the TDMS time column and the T, D & V then simply thresholding and interpolating each of your array/data sets should allow readings at your desired times.
Attachments:
Interpolate.png 301 KB
Maybe you are looking for
-
Simply highlighting the songs on iTunes and pressing delete no longer works when I plug my phone in. HELP
-
At new .....statement in ALV
I have created an ALV report . In the report, the requirement is to display the material name and its description whenever it changes. How can i use the at new matnr...or on change of matnr in an ALV report .. Please help me out.. Thanking you in adv
-
Can Adobe Air apps be launched in Java? What I am trying to do is to create some Adobe Air UI (like dialogs) and include that into a Java Application?
-
Jpeg thumbnails wont display in organiser
Has can one got a solution as to why I can't view jpeg thumbnails in elements 10 organiser???
-
My mac says that iPhoto is installing, when it isn't
Hi All - my macbook pro - which I recently updated to Mavericks, says my iPhoto is installing - when it clearly isn't. I can't access my photos. Can anyone please help? Thanks