The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 import txt from different folder in one columne
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Sigake

Germany
4 Posts

Posted - 06/04/2009 :  07:05:02 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin 8 and Service Release 1

Hello everybody

I hope my English is not too bad and you understand my problem and have a solution.

I have different folder
c/a/
c/b
c/c
c/d

for example. In every folder is a txt file called Spannung.txt

I want all txt-files in one columne among each other.

I searched but I could not found a topic, which helped me.
Have anybody an idea for my problem ? Thanks for help!

greg

USA
1378 Posts

Posted - 06/04/2009 :  5:56:17 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Is this what you have in mind?

Select File : Import : Multiple ASCII
Browse to each folder and Add the file you want
Check the 'Show Options Dialog'
Click OK
Choose 'Start New Rows' for 'Import Mode'
Click OK

The script equivalent is:
string fname; // Declare a string for our file list
fname$="D:\tmp\a\Spannung.txt
D:\tmp\b\Spannung.txt
D:\tmp\c\Spannung.txt"; // Fill the list
impasc options.impmode:=2; // Import all files by new rows

Edited by - greg on 06/04/2009 6:00:32 PM
Go to Top of Page

Sigake

Germany
4 Posts

Posted - 06/05/2009 :  03:48:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello greg,

thanks for your answer. The problem is, I have more than 80 folder in which is the file "Spannung.txt". I cant open all the folders manually and add the files.
Go to Top of Page

greg

USA
1378 Posts

Posted - 06/05/2009 :  12:38:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Then the answer is:

Right-click in the upper-left corner of an empty worksheet
Choose ASCII Options..
Change 'Import Mode' to 'Start New Rows'
Click Update

Now in Windows Explorer, browse to the top-level folder with all your subfolders.

Press F3 or Ctrl+E or click Search button
Enter 'Spannung.txt' as the file to search for
(I think default is to search subfolders, but click Advanced and make sure 'Search Subfolders' is checked.)
Click 'Search Now'
Select all the found files (Ctrl+A is the shortcut)
Drag the files onto the Origin worksheet

Viola!

(Tip 'o the hat to user eparent..)
Go to Top of Page

Sigake

Germany
4 Posts

Posted - 06/08/2009 :  02:21:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Greg,

1000 thanks for your help. I it so easy :o)



Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000