|Subject||Manipulating the variables before use|
|Message||I’m trying to automate a data transfer
process. What needs to happen is that a Folder is checked if files with
a .svd extension are present. If they are present program X should run
with input files that have the same names as the files with the .svd
extension. But program X does not run if the filenames (variables) have
an .svd extension.
I monitor the Folder for the svd files. Copy them to another Folder and rename them to a file without an .svd extension. That file (variable) I use as input file (variable behind command line) for program X to use. This all works. But copying the files is a time consuming action, even at night.
What I want is to skip the copying and renaming of the files. The input files for program X are in a different Folder, I only use the names of the .svd files. Within program X I have assigned the specified Folder for the input files. The only importance is that the input files have the same names as the files with the .svd extension but do not have the .svd extension, they can be empty text documents.
Could you tell me if it it is possible to use the variable files with .svd extension but leave the .svd extension out of the program command line. Or if it is possible to make new files with the filenames of the files, in the Folder with the .svd files, without any extension at all.
This automatic check of the folder and run of program X is put in a chain, so that as soon as a .svd files ‘enters’ the folder program X will run with an other file that has the same filename as the svd file
Thanks in advance.
Thanks for using Automize.
1) I do not have your support files, but I assume that you are using the FileMonitor task and using either the $%....::FileName%$ or $%....::Filenames%$ variables.
2) Right now I think, what you are doing (i.e. copying) is the only solution that is fully accomplished within automize.
3) Your other option would be to use a batch file to remove the extension from the variable name. You would have to pass the variable name to a batch file which would remove the extension and save the filename variable (without extension) to a temp file. Then using the $%FILE:: variable you would be able to get this filename without the extension from the temp file.
sincerely, melvin desilva hitek software