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 for Programming
 LabTalk Forum
 path of a draged file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Sell

Germany
20 Posts

Posted - 01/03/2006 :  07:53:30 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): Origin Pro 7.587
Operating System: XP

I'm importing several files by drag and drop of the file into the origin workspace. After that an import filter and a script is invoked. Is there access to the path from where the draged file comes? I would like to save a generated worksheet window into that directory.

Hans

Edited by - Sell on 01/03/2006 07:54:18 AM

Mike Buess

USA
3037 Posts

Posted - 01/03/2006 :  3:05:54 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Hans,

Try this in your script...

%Z=doc.dropfilename$; // path\name of dropped file
for(i=1;i>0;i++)
{
%F=%[%Z,#i,\]; // ith token in path
if(%F=="") break;
%A=%F;
};
// %A is file name
%B=%[%Z,%[%Z]-%[%A]+1]; // file path

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 01/03/2006 3:06:39 PM
Go to Top of Page

Sell

Germany
20 Posts

Posted - 01/04/2006 :  03:00:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,

it works perfectly. Exactly what I'd looked for.

Thanks a lot

Hans
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