Friday, March 23, 2018

#1 2017-11-02 12:42:13 pm

From:: South Tirol
Registered: 2008-07-04
Posts: 550

Unable to make a batch file executable

Sorry for my question, as it is pretty off-topic.
Maybe somebody can give me directions
I need to create for a bigger code  "*.bat" -files, they are windows batch files to be exact. Not that I'm excited about windows- but OK.

To do so I created some plain text files with:


set win_pt to "Program Files\\Apps\\"
set to_write to "start \"C:\\" & win_pt & "Translator.exe\""
set inputFile to ((path to desktop folder as text) & "Test.bat" as text)
set accessRef to (open for access file the inputFile with write permission)
   set eof accessRef to 0
   write to_write to accessRef as «class utf8»
end try
close access accessRef

Now I got a file but it didn't work in a windows environment. Therefore I tried this:


do shell script "chmod +x '" & POSIX path of inputFile & "'"

Didn't work either.
I guess a template to write into is the only solution. Some suggestions?



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)