Is this possible?

Discuss RoboTask here
Post Reply
gwendri
Posts: 1
Joined: Thu Jun 30, 2011 12:38 am

Is this possible?

Post by gwendri »

I am looking for a program that will watch a specific folder for new files.  When the new files are found it would then open the files and search for specific text. If found it would close the file and move it to another folder.  If not found, it would change different text in the file, save and move the file to another folder.  All of the files will be moved to the same folder in the end.Multiple files will be input in the watched folder at the same time.Is this possible with this program?  How difficult would this be?Thank you for your answers and help
Oleg
Site Admin
Posts: 3018
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Is this possible?

Post by Oleg »

Yes of course it is possible.
I am looking for a program that will watch a specific folder for new files
Look at "File Monitor" triggering event. It will start you task when new files arrived
then open the files and search for specific text. If found it would close the file and move it to another folder. If not found, it would change different text in the file, save and move the file to another folder. All of the files will be moved to the same folder in the end
You may use strings actions or regular expressions (it depends on your goals).
In order to replace text use STR Replace (or RegExp Replace for more compex cases)
In order to process files one-by-one use File Loop
MCHAL
Posts: 7
Joined: Sun Oct 07, 2007 8:26 am
Location: Brazil
Contact:

Is this possible?

Post by MCHAL »

Besides, is it possible to make the program not move/copy files if they don't exist in the destination folder? Sometimes I update translation files and for this I need to temporarily unpack/install the program related to the translation in a partition/drive other than the one from which I do the translation task - procedure that kind of works as a makeshift backup resource. Then, of course, after finishing the job, I delete/uninstall the destination program/folder, so as not to clutter the involved drive with programs that actually I happen not to use.

Thanks.
Oleg
Site Admin
Posts: 3018
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Is this possible?

Post by Oleg »

is it possible to make the program not move/copy files if they don't exist in the destination folder?
Use File loop by mask. It is useful when you don't know filenames beforehand.

For example:
file loop by *.txt processes all existing TXT files.
MCHAL
Posts: 7
Joined: Sun Oct 07, 2007 8:26 am
Location: Brazil
Contact:

Is this possible?

Post by MCHAL »

I guess you didn't realize the sentence was a negative one. Please, note that I wrote "NOT move/copy files...". Sorry, I should have stressed this.Thanks for your time.
Post Reply