I want to open a specific lister after Python crawling.
This following code opens a specific folder.
But I hope that a lister 'Python' would be opened. How can I get the reult?
Thanks for any help in advance.
import subprocess
dopus_path = r"C:\Program Files\GPSoftware\Directory Opus\dopus.exe"
dir_path = r"D:\ing"
subprocess.run([dopus_path, dir_path])
Might want to use
"dopusrt.exe /cmd Go dirname" rather than "dopus.exe"
Leo
May 4, 2024, 6:42pm
3
Is "Python" the name of a layout you have made?
Do you want to open the layout as it was saved, or open it but modified to point to a particular folder?
What's the difference between dopus.exe and dopusrt.exe?
this following script doesn't work.
dopus_path = r"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe /cmd "
dir_path = r"D:\ing\부동산"
#lister ="/cmd"
subprocess.run([dopus_path, dir_path])
I don't know how to add the related code to lister 'Python'.
( The lister name : Python )
Python is the name of layout I've made. I want to open the layout.
Thank you for your reply.
import subprocess
dopusrt_path = r"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe"
layout_path = r"d:\temp\Layout.dcf"
subprocess.run([dopusrt_path, layout_path])
That opens the layout saved earlier as Layout.dcf
Thank you for your help.
But I can't find the postion of Python.dcf.
I tried it by searching hiddenfiles with everything and File Explorer.
Leo
May 6, 2024, 11:17am
8
Best way to open a layout from outside of Opus:
"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /cmd Prefs LAYOUT="My Layout"
DOpus.exe is the main program, while DOpusRT.exe is a small utility for sending commands to it (and a few other things). It's faster to run DOpusRT.exe than DOpus.exe, assuming Opus is already running.
Thank you for your help. I tried this following code by VS code.
import subprocess
dopus_path = r"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /cmd Prefs LAYOUT="Python"
subprocess.run([dopus_path])
it shows this following error.
PS C:\Users\ONSTAR> & "C:/Program Files/Python312/python.exe" d:/공통/source/Python/temp_dopus.py
File "d:\공통\source\Python\temp_dopus.py", line 3
dopus_path = r"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /cmd Prefs LAYOUT="Python"
^^^^^
SyntaxError: invalid syntax
Leo
May 6, 2024, 12:11pm
10
I'm not familiar with Python's syntax, but that doesn't look like a properly formed string.
hancre
May 6, 2024, 12:15pm
11
this following error shows underline(^^^^^) below prefs.
I hope it would be a hint. ^^
Thank you for your help again.
It's not altogether clear what you're trying to do. If you want to have a Python equivalent of
dopusrt /cmd Prefs LAYOUT="Python" then I think it should look like this (but I'm not sure this is what you want)
import subprocess
dopusrt_path = r"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe"
subprocess.run([dopusrt_path, '/cmd', 'prefs', 'layout="Python"'])
But if you want to start DOpus with a previously saved layout you might want something more like this
import subprocess
dopusrt_path = r"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe"
layout_path = r"c:\Python.dcf"
subprocess.run([dopusrt_path, layout_path])
In the layout editor you can create a shortcut to your layout, which is where the .dcf file is saved to.
hancre
May 6, 2024, 11:46pm
13
Thank you for your help.
I fixed the issue.
import subprocess
dopusrt_path = r"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe"
subprocess.run([dopusrt_path, '/cmd', 'prefs', 'layout=Python'])