Home » Developer & Programmer » Forms » how to use HOST command
how to use HOST command [message #235904] Tue, 08 May 2007 06:27 Go to next message
progdoc
Messages: 9
Registered: January 2007
Location: Sr
Junior Member
hi all,

I have folder D:\files\ and in that folder several txt files like file00.txt
file01.txt
file02.txt
file03.txt
.....
how to get path of every file in this folder with HOST command
and then I'll use Text_IO.FOpen to read that files,
and after I read file how to move file to another folder with HOST commad

thanks
Re: how to use HOST command [message #236078 is a reply to message #235904] Wed, 09 May 2007 00:27 Go to previous messageGo to next message
sameer_am2002
Messages: 129
Registered: September 2002
Senior Member
First Get the file name using Get_File_Name utility.
Then
Use Win_Api utility instead..

E.g
Create Three Items 2 push button 1 text box item
Item Names TXT_ITEM1 , PB_ITEM1 , PB_ITEM2
Write this code in WBP OF PB_ITEM1
DECLARE
filename VARCHAR2(256);
BEGIN
filename := GET_FILE_NAME(File_Filter=> 'TXT Files (*.txt|*.txt|');
:TXT_ITEM1 := filename ;
END;

Write this code in WBP of PB_ITEM2
declare
begin
Win_Api_Utility.Copy_File(:TXT_ITEM1 , New File Name with Path of your choice);
end ;

Re: how to use HOST command [message #236080 is a reply to message #235904] Wed, 09 May 2007 00:28 Go to previous message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

I don't know how to get the path, dos help provides nothing. But if you already know the path, you can simply get the the file names. HOST('dir /b D:\files\*.txt > D:\file.txt',NO_SCREEN);
Previous Topic: HELP: Format Mask
Next Topic: FRM-40509 ORA-02292:
Goto Forum:
  


Current Time: Sun Dec 04 04:35:05 CST 2016

Total time taken to generate the page: 0.06874 seconds