How do I set up where I want the shell to start up ?
Or eventually, how do I change the shell current directory ?
I am trying to run some python scripts that require I run then from certain directories…
thanks
R
How do I set up where I want the shell to start up ?
Or eventually, how do I change the shell current directory ?
I am trying to run some python scripts that require I run then from certain directories…
thanks
R
shell.execute “cd /your_folder”
Doesn’t seem to work, or I am not getting it right…
shellpython.Execute “f:”
shellpython.Execute “dir”
OutputArea.AppendText(shellpython.Result)
then after the dir command…
El volumen de la unidad D es SOFT-DATA
El número de serie del volumen es: 6CAA-F38F
Directorio de D:\Xojo\Xojo 2015r2.3
It it still in app.currentdirectory
I think I read that every time you call a new shell.execute it opens up a new shell… so maybe this is why it’s not working… ?
What mode is the shell in? And what OS?
windows
shellmode = 0
On Windows, you can put multiple commands on a single line, separated by &
sh.execute(“cd \some\path & dir”)
I still can get it to change the drive… in regular shell window, in command prompt I can type “F:” and it will change the drive to F
But as it is not a command it is not recognized…
No, that one probably won’t work. Create a temp batch file and execute that.
This works :
dim s as new shell
s.execute("f: & dir")
msgbox s.result
This too :
cd f: & dir
f: & dir <-- THIS did the trick !
Thanks Michel!
Also I had typed “F:” intstead of “F:” not sure if that makes a difference though…
[quote=261846:@Roman Varas]f: & dir <-- THIS did the trick !
Thanks Michel!
Also I had typed “F:” intstead of “F:” not sure if that makes a difference though…[/quote]
If you want to change drive and path together, use
CD /D F:\\
CD /D F:\\Documents