Is it possible to walk through (iterate) a directory to find out all the files/dirs just under that directory?

asked 24 Apr '13, 03:34

gt8967884's gravatar image

gt8967884
116747678
accept rate: 12%


You can use <findFile> action to find a specific file. It is documented in Find File section of InstallBuilder User Guide actions description.

Could you provide us with more details on what you want to achieve? Are you looking for specific file(s), want to make a list of all files or to copy/rename/remove specific files?

Also, what platforms is this needed for?

link

answered 24 Apr '13, 08:01

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

<findfile> doesn't work for me. I need to get a list of directories and files in a certain directory before the installation, then check the directory again after the installation and remove the files/directories that don't exist before the installation. This is for both Windows and Linux.

(24 Apr '13, 15:55) gt8967884

Unfortunately that does not seem like something InstallBuilder can do.

The best approach would be to create a small script or binary that lists all the files before installation, saves it in a temporary directory and then same/another program would read it, list all files after installation and remove files not needed.

The binary/script can be unpacked before installation, which is documented here: Unpacking before installation time.

(25 Apr '13, 07:12) wojciechka ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2
×1

Asked: 24 Apr '13, 03:34

Seen: 682 times

Last updated: 25 Apr '13, 07:12