Sunday, November 19, 2017

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

Joy
Member
From:: South Tirol
Registered: 2008-07-04
Posts: 521
Website

Unable to make a batch file executable

Hi,
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:

Applescript:

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)
try
   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:

Applescript:

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?

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)