Page 1 of 1

simply pass a filename to a command?

Posted: Fri Nov 09, 2007 12:48 pm
by kenwshmt
Whats the easiest way to pass the file name and path to a program?- file changes, move file to someplace else so it wont trigger again.pass that path to a program or batch for processing.as in-path1/pic.jpgmove(or rename) to path2/pic.jpgjpegoptim path2/pic.jpgetc.having it all happen in the GUI would be best.passing arguments to a batch would also work.I just hadn't been able to figure out how to do it with robotask.

simply pass a filename to a command?

Posted: Mon Nov 19, 2007 11:28 pm
by Oleg
You can easily determine the name of file in the File loop (for example)
Next, you need to move file to another folder.

Your task will looks so:

File loop //and save current file name to C_FileName variable (for example)
   move {c_FileName} to c:\path2
end loop


If you need to know new full file name do concatenation the ne path and original file name.
There is {ExtractFileName()} variable in order to extract file name fron full path of the file.

Just use
c:\path2\{ExtractFileName({c_FileName})}

Also see other system variables: menu Options | Variables

simply pass a filename to a command?

Posted: Mon Nov 19, 2007 11:30 pm
by Oleg
Thus your task will be such:

File loop //and save current file name to C_FileName variable (for example)
   move {c_FileName} to c:\path2
   run program jpegoptim c:\path2\{ExtractFileName({c_FileName})}
end loop