I’m trying to make Navision fetch some files via ftp, for importing and handling through NAS.
I’ve created a BAT-file that can do that for me.
First it connects to the ftp-site, and fetches the files.
Then it copies the files to some other location. (right now it copies files between 2 locations locally on my PC).
When I run the BAT-file directly in an explorer, everything works perfectly.
But when I try to run the BAT-file from within Navision, the chain breaks somewhere.
I use WshShell.RUN(Textvar,Par1,Par2).
I’ve tried to change Par1 (WindowsStyle) to 1, for the window to open, so that I can see what is going on.
And I can see that the files are retrieved ok.
But when it comes to copying them to the other location, it says file not found. [:’(]
So my question is…
Why does this work when run from the explorer, but not when run from inside Navision?
When I run it from the explorer, the files are initially stored in the folder that contains the BAT-file.
But when run from inside Navision, they seems to be stored somewhere else…
Searching for them haven’t given me any clue, so they are apparently not stored directly on my PC.
I expect that if I break my BAT-file up, into 2, and do the retrieval in the first, and then do the copying in the second, it will work…
But I haven’t tried it yet.