Files with %USERPROFILE% Path and how to execute bat file from Omnis.
Hi,
I’m trying to create a file on a windows machine with FileOps. The local path I’m using is %userprofile%appdatalocaldaveexportpdf. The reason I use this is because we are on a terminal server and I want to temporarily create some files in the temp folder to than later copy them to a file server.
Now when I do FileOps.$createdir( %userprofile%appdatalocaldaveexportpdf) I get the error -43 (File Not Found).
When I do the same methode with FileOps.$createdir(C:Usersan.bayensappdatalocaldaveexportpd) which is the exact same folder it works.
Is it possible that FileOps cannot translate %userprofile%?
Then after my files are created in the temp folder I want to copy the whole folder to a network drive. Because I don’t see an function in Omnis to copy a complete folder I created a script to do this.
Now I want to run this script from Omnis but I’m not really sure how to do this.
I tried this but it doesn’t work.
So I have my move.bat which needs 2 parameters. When I just execute this command in a terminal windows it works perfectly.
Switch sys(6)
Case ‘N’
Calculate script as con(‘”C:DavePrefsmove.bat ‘,iListPrefs.4.C2,’ ‘,iListPrefs.1.C2,'”‘)
Start program maximized {[script]}
If flag false
OK message (Icon,Sound bell) {Copy failed}
End If
End Switch
Met vriendelijke groeten,
An Bayens
Product Manager
Stationsstraat 266, B-1700 Dilbeek
T. +32 2 567 21 71
Helpdesk: +32 2 568 14 54
an.bayens@optimizegroup.be <mailto:an.bayens@optmizegroup.be>
www.justsoftware.be <www.justsoftware.be/> | www.optimizegroup.be <www.optimizegroup.be/>
<www.justsoftware.be/>
<www.justsoftware.be/> <www.justsoftware.be/nieuws/531-kmo-portefeuille> <www.facebook.com/optimizegroupBE> <www.linkedin.com/company/optimize-group> <www.linkedin.com/company/optimize-group>
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com