Files with %USERPROFILE% Path and how to execute bat file from Omnis.
Im pretty sure omnis does not have a clue what %userprofile% is for windows
user. Did you try sys(115) to get the path for the user? (you will need to
trim this path after to get what you want, but at least you can get the
user).
Andrew
On Thu, Mar 15, 2018 at 11:44 AM, An <an.bayens@justsoftware.be> wrote:
> 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 <+32%202%20567%2021%2071>
> Helpdesk: +32 2 568 14 54 <+32%202%20568%2014%2054>
>
> 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/ni
> euws/531-kmo-portefeuille> <www.facebook.com/optimizegroupBE> <
> www.linkedin.com/company/optimize-group> <
> www.linkedin.com/company/optimize-group> <
> https://twitter.com/groupoptimize> <plus.google.com/11461
> 3785888034261968> Follow us on your favorite social media sites! <
> plus.google.com/114613785888034261968>
>
>
> _____________________________________________________________
> Manage your list subscriptions at lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com
>
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com