Search found 6 matches

by cats_five
10 Aug 2015 03:29
Forum: DOS Batch Forum
Topic: Running DOS batch script from another program
Replies: 9
Views: 4285

Re: Running DOS batch script from another program

The other program is running on a server and passes the script to a frontend running on a workstation, always a Windows PC in our case. However thanks for the suggestion, it will deal with determining if something is a folder though not if it's readonly. But maybe I can do without that. I will take ...
by cats_five
06 Aug 2015 03:05
Forum: DOS Batch Forum
Topic: Running DOS batch script from another program
Replies: 9
Views: 4285

Re: Running DOS batch script from another program

His code works in a batch file (of course!), I didn't notice it arriving. It's complicated to explain clearly why it needs to be on one line, but it's to do with another program only being able to run a single line of DOS and only being able to pick up true or false as the outcome. I can see how I w...
by cats_five
05 Aug 2015 08:18
Forum: DOS Batch Forum
Topic: Running DOS batch script from another program
Replies: 9
Views: 4285

Re: Running DOS batch script from another program

This I is as far as I've managed to contract it: setlocal EnableDelayedExpansion & set G=%1 & for %%H in ( !G! ) do ( set I=%%~aH ) set J=%I:~1,1% if %J% EQU r (echo readonly) else (echo writeable) & endlocal Which produces the following output: E:\Users\sallyw\Downloads>sw3.bat TEST E:\...
by cats_five
05 Aug 2015 04:12
Forum: DOS Batch Forum
Topic: Running DOS batch script from another program
Replies: 9
Views: 4285

Re: Running DOS batch script from another program

I've had a go at reducing the script to a single line. This is my original script, which works - I added setlocal & endlocal as I was getting problems resulting from variables persisting in my DOS window. I also changed path to P as I realised path is a system variable and (naturally!) resetting...
by cats_five
04 Aug 2015 08:45
Forum: DOS Batch Forum
Topic: Running DOS batch script from another program
Replies: 9
Views: 4285

Re: Running DOS batch script from another program

I know I need to use exit, what I've obviously not explained very clearly is that I need to be able to write it as a one-liner.
by cats_five
03 Aug 2015 09:38
Forum: DOS Batch Forum
Topic: Running DOS batch script from another program
Replies: 9
Views: 4285

Running DOS batch script from another program

I want to get a front-end program run a DOS script, but it only has one variable to pass the script in and I am at a lose as to how to form my working batch script into the variable. This is not quite how it needs to be in the final version - instead of the echo it will it needs to exit 0 or 1 as ap...