Jump to content

Get strings from files and put into array


SpOOki
 Share

Recommended Posts

Hello,

I try to find solution for my problem but I can't. Somebody can help me?

1. One file - FISINFO.txt with a lot information.

2. Few directories with the same files (different information inside).

3. I need to export this information (eg. Application version) to one table in my SQL database.

Present I use findstr.exe application for this.

INSERT INTO master..POS_APP_VERSION(C_APP_VER) exec xp_cmdshell 'd:\findstr.exe /S /C:"Application version" d:\temp\FISINFO.txt'

When I will be have data from file in array I can put to SQL table. Important is: how I can get data to array from all files.

Regards

fisinfo.txt

Link to comment
Share on other sites

Hello,

I try to find solution for my problem but I can't. Somebody can help me?

1. One file - FISINFO.txt with a lot information.

2. Few directories with the same files (different information inside).

3. I need to export this information (eg. Application version) to one table in my SQL database.

Present I use findstr.exe application for this.

INSERT INTO master..POS_APP_VERSION(C_APP_VER) exec xp_cmdshell 'd:\findstr.exe /S /C:"Application version" d:\temp\FISINFO.txt'

When I will be have data from file in array I can put to SQL table. Important is: how I can get data to array from all files.

Regards

I'm not sure I understand your post, but one problem with findstr.exe is that it gives the whole file which contains the search string, but you might only want the file name and the line with the search string. Perhaps this script might be useful to you.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...