working-directory Questions
3
Solved
When I run the following script in IDLE
import os
print(os.getcwd())
I get output as
D:\testtool
but when I run from cmd prompt, I get
c:\Python33>python D:\testtool\current_dir.py
...
Bowie asked 28/6, 2013 at 7:42
7
I am going through some Git tutorials. The concept of a "working directory" keeps being mentioned, however, none of the tutorials or documents I read points out where or what this "working director...
Flintshire asked 24/3, 2016 at 13:27
1
I'm trying to run a PowerShell script as administrator using a shortcut. I have tried many ways, but it still does not work:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPoli...
Henni asked 25/2, 2021 at 4:23
6
I upgraded to RStudio 1.0.44 and it seems knitr::opts_knit$set(root.dir = path) where path is my directory is not working as before. It throws a message:
The working directory was changed to /... ...
Libove asked 21/11, 2016 at 9:59
7
Solved
I'm making a C program where I need to get the directory that the program is started from. This program is written for UNIX computers. I've been looking at opendir() and telldir(), but telldir() re...
Hortense asked 18/11, 2008 at 11:36
8
Solved
As the title reveals it, we are writing a Unix-style shell utility U that is supposed to be invoked (in most cases) from bash.
How exactly could U change the working directory of bash (or parent i...
Weatherboarding asked 3/3, 2010 at 21:13
6
How can I get the current directory (working directory) of the executing program in Scala?
Audrey asked 16/4, 2018 at 14:32
14
Solved
How can I change the current working directory from within a Java program? Everything I've been able to find about the issue claims that you simply can't do it, but I can't believe that that's real...
Aerobiosis asked 8/5, 2009 at 14:54
4
Solved
I have a program that reads and writes a text file that exists in the same directory as the executable. To access that file, I call readFile "./file.txt"
This works when I run the executable from ...
Braid asked 11/9, 2012 at 1:36
3
I want to determine the absolute path of files used by a known process by reading the command line. Currently, the process is started with relative paths in the command line that point to various f...
Socman asked 30/7, 2010 at 21:15
4
There are a number of examples on the web of how to run a file from the Notepad Plus Plus (NPP). But they all fail to account for the fact that the current working directory is the location of the ...
Coercion asked 28/8, 2016 at 15:38
1
Solved
When I launch a PowerShell script from any folder (e.g. C:\Scripts),
the 'current' PowerShell folder in the script
is always the User Profile Folder(e.g. c:\users\Joe ; test with a script with only...
Cowskin asked 7/10, 2019 at 21:43
3
Solved
Consider the following sequence of commands upon opening a PowerShell terminal:
PS C:\Users\username> cd source
PS C:\Users\username\source> $dir = ".\temp"
PS C:\Users\username\source> [...
Jenniejennifer asked 3/9, 2019 at 17:24
5
Solved
I created a VSTO Outlook Addin that uses a library Html2Xhtml.dll (.NET) which calls another Html2xhtml.exe by executing System.Diagnostic.Process.Start().
However, it fails to call Html2xhtml.exe...
Submerse asked 27/3, 2012 at 9:40
9
Solved
How can I change my current working directory in C++ in a platform-agnostic way?
I found the direct.h header file, which is Windows compatible, and the unistd.h, which is UNIX/POSIX compatible.
Murage asked 14/8, 2010 at 21:20
4
I've started to teach myself Haskell, and for that I've installed The Haskell Platform for Windows. I'm using WinGHCi as of now. I learned that it has command :cd which is used to change directory....
Bick asked 28/6, 2012 at 17:53
4
Solved
Firstly, I saw this topic but I couldn't understand that.
Question :
There is a batch file in D:\path\to\file.bat with following content :
echo %cd%
pause
Output is :
C:\
It must be D:\path...
Institutional asked 12/6, 2013 at 11:9
2
Solved
When I first started using Git, I found the checkout command quite confusing. However, as I adapted to Git's model of version control, it started to make sense. Now I am having to teach Git to my c...
Gang asked 3/3, 2015 at 16:44
3
Solved
I'm looking at a Jenkins job and trying to understand it.
I have an Execute shell command box in my Build section:
> mkdir mydir
> cd mydir
>
> svn export --force https://example.co...
Alishiaalisia asked 25/6, 2014 at 15:10
4
RStudio has a useful feature:
Session -> Set Working Directory -> To Source File Location
Is there a way to do this without using the drop down menus?
UPDATE:
maybe a better way of askin...
Sheelah asked 23/10, 2014 at 0:2
9
Solved
I want to copy a file from a jar. The file that I am copying is going to be copied outside the working directory. I have done some tests and all methods I try end up with 0 byte files.
EDIT: I wan...
Leonhard asked 25/4, 2012 at 1:29
6
Solved
I have a working copy for my entire repository, which contains multiple Python projects. When I choose right-click --> SVN Update in Windows File Explorer I am getting an error message listing a pa...
Lustrous asked 2/5, 2012 at 13:31
1
Solved
My Problem
I use a Makefile to run a docker run target, which needs the current working directory as one of its parameters.
I use either $(PWD) or $(CURDIR):
build: Dockerfile
docker run ... &l...
Analgesic asked 21/9, 2018 at 6:20
2
Solved
It's not clear from the documentation what the working directory is for pre-build or post-build events in Visual Studio. What is it? Where is this documented?
Bugger asked 25/5, 2017 at 3:6
4
Solved
I am getting weird behavior of "Developer Command Prompt for VS 2017" command line tool. Normally in previous versions of visual studio this script (VsDevCmd.bat) was not messing current directory ...
Being asked 11/10, 2017 at 7:6
© 2022 - 2024 — McMap. All rights reserved.