Basic Question
- abbasi
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 90
- Thank you received: 0
15 years 6 months ago #4115
by abbasi
Basic Question was created by abbasi
Dear Friends,
I am new in InfoBasic/jBase please guide me in my following Questions:
1. How to create directory in my Subroutine
2. How to check my directory exist in my Subroutine
3. How to Delete Specific file in my created directory
Best Regards,
Abbasi
I am new in InfoBasic/jBase please guide me in my following Questions:
1. How to create directory in my Subroutine
2. How to check my directory exist in my Subroutine
3. How to Delete Specific file in my created directory
Best Regards,
Abbasi
Please Log in or Create an account to join the conversation.
- kees
- Offline
- Premium Member
-
Less
More
- Posts: 149
- Thank you received: 0
15 years 6 months ago #4119
by kees
Replied by kees on topic Re:Basic Question
To create a directory:
Y.DIR.NAME = "TEST.DIR"
Y.SEQ.FILE.NAME = 'MY.txt'
OPENSEQ Y.DIR.NAME,Y.SEQ.FILE.NAME TO Y.SEQ.FILE ELSE
EXECUTE 'CREATE.FILE TEST.DIR TYPE=UD'
CRT "CREATED DIRECTORY"
END
To check if directory is existing:
Y.DIR.NAME = "TEST.DIR"
Y.SEQ.FILE.NAME = 'MY.txt'
OPENSEQ Y.DIR.NAME,Y.SEQ.FILE.NAME TO Y.SEQ.FILE THEN
CRT "Directory TEST.DIR already exists"
END
To delete a specific file in directory:
Y.DIR.NAME = "TEST.DIR"
Y.SEQ.FILE.NAME = 'MY.txt'
EXECUTE "DELETE ":Y.DIR.NAME:' ':Y.SEQ.FILE.NAME
Y.DIR.NAME = "TEST.DIR"
Y.SEQ.FILE.NAME = 'MY.txt'
OPENSEQ Y.DIR.NAME,Y.SEQ.FILE.NAME TO Y.SEQ.FILE ELSE
EXECUTE 'CREATE.FILE TEST.DIR TYPE=UD'
CRT "CREATED DIRECTORY"
END
To check if directory is existing:
Y.DIR.NAME = "TEST.DIR"
Y.SEQ.FILE.NAME = 'MY.txt'
OPENSEQ Y.DIR.NAME,Y.SEQ.FILE.NAME TO Y.SEQ.FILE THEN
CRT "Directory TEST.DIR already exists"
END
To delete a specific file in directory:
Y.DIR.NAME = "TEST.DIR"
Y.SEQ.FILE.NAME = 'MY.txt'
EXECUTE "DELETE ":Y.DIR.NAME:' ':Y.SEQ.FILE.NAME
Please Log in or Create an account to join the conversation.
- abbasi
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 90
- Thank you received: 0
15 years 6 months ago #4125
by abbasi
Replied by abbasi on topic Re:Basic Question
Kees, Thanks alot
Please Log in or Create an account to join the conversation.
- kees
- Offline
- Premium Member
-
Less
More
- Posts: 149
- Thank you received: 0
15 years 6 months ago #4134
by kees
Replied by kees on topic Re:Basic Question
you are welcome.
Please Log in or Create an account to join the conversation.
Time to create page: 0.028 seconds