Questions tagged [relative-path]

Relative-paths are URI or directory links to resources that refer to a location relative to the current path.

Filter by
Sorted by
Tagged with
1 vote
1 answer
58 views

Copy an existing file at runtime using a relative path

I have a method which saves data into a binary file. I'm trying to unit test this method. That's why I made myself a controller binary file with the data I'm supposed to save using my method. My ...
LPo's user avatar
  • 67
1 vote
0 answers
41 views

PowerShell xml.Save does not save the file on the same path in IntelliJ [duplicate]

I have created a simple powershell script (replacer.ps1), which: Reads a xml file Changes one of the attributes Saves file The code of replacer.ps1 is as follows: function ReplaceElemInXml { ...
fascynacja's user avatar
  • 1,755
0 votes
1 answer
21 views

Import file in Jsnonnet/libsonnet application using relative path

I have a libsonnet file in which I want to import another libsonnet file proving relative path I am able to do it by going backward from current folder For example : import ‘../../../abc.libsonnet’ ...
Charlie's user avatar
  • 67
0 votes
0 answers
32 views

Issue with Reading a File Using Relative Path in Python

I'm currently working on a Python script named bilin_intpol.py which is located in the /HW directory on my system. The script needs to read an image file named lenna.png that is located in the /code ...
Songhua Zou's user avatar
0 votes
1 answer
45 views

python packaging not running, treated like a module

I am trying to create a package in python 3.11.6 on Windows 10 which has relative paths to access the various code modules, Firstly, I thought the basic packaging would work, i.e. just put an empty ...
user3227671's user avatar
1 vote
1 answer
42 views

Unable to use setwd() to change directory from absolute to relative pathway

I get 'cannot change working directory' when I try using setwd() to change my working directory from using an absolute pathway (from C:/examplename/Dropbox/Files) to a relative pathway (~/Dropbox/...
codingproblem's user avatar
0 votes
1 answer
51 views

PHP relative link not working as expected

I'm struggling with a relative link to a .php file. The file contains my initialise code. It's working perfectly on the top-level pages but I just cannot connect on pages with a sub-folder. I have ...
Matt's user avatar
  • 33
0 votes
0 answers
34 views

Relative paths do not work in IntelliJ IDEA

I am having a problem with relative paths in my Kotlin/JavaFX (Intellij IDEA) project. If I try to load a file, using an absolut path it works fine, as soon as I am trying the same with a relative, it ...
Sc4rocko's user avatar
0 votes
2 answers
137 views

Referencing local files from HTML in Android

I have a very simple HTML app with uses a couple of js files, a css and several images. I have all of them bundled on a folder that I downloaded to my mobile phone in the Downloads folder. Now, when I ...
Bardo's user avatar
  • 2,482
0 votes
0 answers
22 views

Get Relative path of file from String - Ruby [duplicate]

I am working with a nested folder and file structure in Ruby. Following is the file structure grand_parent parent_1 child_1.yml child_2,yml parent_2 child_1.yml child_2.yml I am ...
Suganya Selvarajan's user avatar
0 votes
0 answers
22 views

Maven POM relativePath with environment

i want to use in my child's pom.xml an environment variable like ${my_project.id} in the . e.g. <relativePath>../../build/${my_project.id}/pom.xml</relativePath> If I use the value of the ...
Guhopa's user avatar
  • 1
1 vote
0 answers
10 views

Cargo builds with relative path dependencies using docker [duplicate]

We develop microservices in Rust and want to adopt the following repo structure common-dep - Cargo.toml - src/ service-1 - Cargo.toml - Dockerfile - src/ service-2 - Cargo.toml ... docker-...
Jan's user avatar
  • 113
0 votes
0 answers
17 views

Relative path not working in specific file but works with absolute path - PHP [duplicate]

I'm a newbie in PHP. My project is stored in the folder called 'Remember'. I want to include database.php into the home.php Remember/app/database/database.php Remember/app/logged/home.php In the ...
Andrew530's user avatar
0 votes
1 answer
33 views

How to get pwd relative path in bash without first slash

I am writing a small Bash script to do some automatic commands. In particular , i would like to get relative path without first '/' in pwd pwd : Users\hp\OneDrive\Desktop insted of pwd : \Users\hp\...
Ahmad Gamal's user avatar
0 votes
1 answer
64 views

Find file in nested folder and dynamically import the file as a module in python

Lets say I have a file structure as follows: folder1 --file1.py folderStart --start.py folder2 --file2.py folderX --fileX.py ... In start.py, I get a name of a file ...
John Doe's user avatar
0 votes
0 answers
90 views

How to implement relative path imports in npm package

I have a TS npm package and I want to use a relative path within one of its ts files. This other file is a JSON file and I would be applying its path towards a function almost like reading from the ...
Kole's user avatar
  • 1
0 votes
1 answer
198 views

How to efficiently handle a Vue3/Quasar project with dynamic and static image paths

I have a problem that I would not think is unique. There are times my quasar application I use the vite/quasar shortcut for assets as below: <q-carousel-slide :name="2" class="column ...
Irish Redneck's user avatar
0 votes
0 answers
20 views

Python - Writing PDF with href links using relative path to local file

I am producing PDF using wkhtmltopdf with references to files in a folder located at the same level as the PDF: - PDF - AttachmentFolder / Attachment 1.extension1 - AttachmentFolder / Attachment 2....
user1965728's user avatar
1 vote
1 answer
32 views

PHP unlink function use absolute or relative path?

this one really puzzles me, if i use the code below in file delete_pic.php, it give me the Warning: unlink(/upload_pic/image.jpg): No such file or directory in /Sites/delete_pic.php <?php $...
Evan W.'s user avatar
  • 21
0 votes
1 answer
63 views

Replace relative path backslashes in C# .NET 6

I'm trying to get a specific format of the output of the relative path between two paths like so: var from = @"C:\This\is\my\path\folder1"; var to = @"C:\This\is\my\path\folder2\folder3&...
CrazyEight's user avatar
1 vote
1 answer
59 views

how to dot the relative path with arguments in powershell script

I have a header.ps1 file that need to be called from the Main.ps1 script. They are both under the same directory. In the header.ps1 file, it started off with following... [CmdletBinding()] param( [...
Liang Cui's user avatar
  • 131
0 votes
0 answers
37 views

How to load .html file, located in relative path/shared folders to PyQt5 browser widget?

I'm trying to load a .html file that contains plotly plot >2mb size.File is located in shared folder. QUrl.fromLocalfile() is not working as file is in remote location. After using QUrl....
Vinay H R's user avatar
0 votes
0 answers
31 views

Used relative file path to link CSS, but file doesn't load and gives an error (MIME type not supported and strict MIME checking is enabled)

I have linked my CSS file in toDo.html like this: <link rel="stylesheet" href="../../reset.css">. This is what the directory looks like: Web Dev | - reset.css - ...
Manav's user avatar
  • 1
2 votes
0 answers
96 views

How are Linux kernel headers that point outside include/ meant to be used?

My attempt at compiling a kernel module failed. Missing a header file pulled from include/net/netfilter/br_netfilter.h. Its just not there. I do not see how it possibly could. What I expected to see: ...
user's user avatar
  • 21
0 votes
0 answers
42 views

Relative path from a yaml to a markdown not working correctly. Per the absolute files I moved the path by 2 levels but doesnt work :(

My CWD is C:\Users\UserName\source\repos\RepoName.config\item1\yaml1.yaml From this yaml file I am trying to reference the markdown in this path. C:\Users\UserName\source\repos\RepoName\md1.md. I ...
theusual's user avatar
  • 741
0 votes
2 answers
783 views

Trouble loading images from relative paths in Nuxt.js 3

I'm currently developing an application using Nuxt.js 3, and I have an array of objects that contains information about team members. Each object has a profil_path property that holds the relative ...
Péah's user avatar
  • 131
0 votes
1 answer
117 views

How can I modify the output of Select-Object in PowerShell?

I can get file hashes using this code: Get-ChildItem -Path "E:\Test 1" -Recurse -File | Get-FileHash -Algorithm MD5 | Select-Object Hash,Path | Format-Table -HideTableHeaders | Out-File -...
HTWingNut's user avatar
  • 253
-1 votes
1 answer
101 views

Swift relativePath property that FileManager.default.enumerator outputs is full path

I want to get relative paths, but I get full paths in the following code. Xcode 14.3 let homePath = NSHomeDirectory() let homeURL = URL(fileURLWithPath: ".", relativeTo: URL(...
Takakiri's user avatar
0 votes
1 answer
13 views

failing to set path to an extended template from child template

my flask structure (partial, here): SimpleFlask/mysite/ flask_app.py /templates cabwill_base3.htm /cabwill /pagart defaultcontentA.htm This ...
Pierre-Yves DELENS's user avatar
0 votes
2 answers
5k views

relativeLinkResolution not working in Angular 15 but it used to work in 11

For my project that I migrated from Angular 11.2.2 to 15.2.8. Throws this error at compile time Argument of type '{ useHash: true; relativeLinkResolution: string; }' is not assignable to parameter of ...
Vishesh's user avatar
  • 133
0 votes
0 answers
19 views

error in gitlab cicd test stage - no module find even though file is present

________________________ ERROR collecting test_main.py _________________________ ImportError while importing test module '/builds/project/test_main.py'. Hint: make sure your test modules/packages have ...
Coder's user avatar
  • 15
0 votes
0 answers
32 views

Cannot load relative src Images on any browser in Linux

I have tried the same code on multiple Linux distributions but the same issue occurs. Whenever I try to load the following line, every browser on Linux that I've tried reports "Couldn't load ...
azxr's user avatar
  • 1
0 votes
0 answers
153 views

localhost:8080 php relative path 404 not found

In a Tomcat server running under localhost:8080, relative URLs to html documents work fine. But relative URLs to php scripts lead to 404 Not Found. When I replace the URL by the absolute path the ...
Peter33's user avatar
0 votes
0 answers
18 views

How to define a path from the "views" folder to "javascript/controllers" folder in Rails 7 application?

I have a following file: app/javascript/controllers/tippy.js, which I would like to reference in the other file: app/views/pages/start.html.erb. I am trying to define the path in script tag, like: &...
Edyta's user avatar
  • 1
-2 votes
2 answers
73 views

Unable to display HTML Image while using Relative Path when loading with Live Server

I am experiencing difficulties when it comes to my jpeg images on Line 14 rendering on the Live Server. I will need to use a Relative Path link, since these images are not on any server. Ive tried a ...
Niharshah1996's user avatar
0 votes
1 answer
45 views

How to access a relative URI using StreamReader in C#

So I'm trying to read/write to a generic .dat file which contains plain text. I've been trying to do it with StreamReader/Writer as this seemed to be the neatest way of doing things. The data.dat file ...
AuthorBrotherGames's user avatar
0 votes
0 answers
197 views

Using os.path.relpath on Windows network drive

I need to get the relative path on a network drive. So, from s:\path\to\file, I want to get path\to\file. So, this works: In [8]: path = r's:\path\to\file' In [9]: path[3:] Out[9]: 'path\\to\\file' ...
mrgou's user avatar
  • 1,666
0 votes
1 answer
48 views

Custom icon to a link in USB Drive with relative path

I have to distribute a project in several USB Drives. Inside them there's a folder containing the entire project (which will be made hidden) and a link to it with a custom icon applied. The problem is ...
Giuseppe's user avatar
0 votes
2 answers
92 views

Needing to have user input for some paths and use relative paths for compressing my folder

I am creating an automation script that should take a user's input for version, package new, and new package path, then compress it into a zip folder. Unfortunately, I can't hardcode the paths, so I'm ...
Sabrina Grosse's user avatar
0 votes
0 answers
113 views

Xcode take relative path when I add new file

I have issue with xcode and cause issue with my team when I comments my code. when I add new swift file it always take relative path from root to file location in project not the absolute path. do any ...
NinjaDeveloper's user avatar
1 vote
1 answer
557 views

How can i solve this problem? None of these files exist: * ..\src\components\Main.jsx

The full error message is: None of these files exist: ..\src\components\Main.jsx(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|....
ALEJANDRO VALENZUELA RUIZ's user avatar
1 vote
1 answer
163 views

python unittest: relative paths to files - pycharm vs cli

I have unittests that require access to files. this is due to the nature of the project that generates files as output and I want to compare to the expected output. Currently my directory structure is:...
beginner_'s user avatar
  • 7,342
0 votes
0 answers
40 views

Writing import statements using Node Path.relative

I'm amending import statements inside files using Babel/ASTs. For each import statement, I have the current files absolute path and the absolute path of the file it will import. For some reason Node's ...
Dol's user avatar
  • 954
0 votes
1 answer
787 views

Angular 15 Cannot find module '@env/environment' or its corresponding type declarations.ts(2307)

I have created a angular 15 application. My environments folder is under src. Following is a snippet from my tsconfig.json: "baseUrl": "./src", "paths": { "@app/*&...
rahul mukherjee's user avatar
1 vote
1 answer
514 views

Set Windows shortcut arguments path relative

My goal is to create a portable PDF that will execute with the portable navigator I include in the package. The problem is that the navigator's shortcut changes and sets itself relative path correctly,...
Lluís Paradell's user avatar
0 votes
1 answer
171 views

Qt How to add dynamic resource files to project without using .qrc?

My qt project is like this. While the program is running, the "config.xml" will be edited, then the "run.bat" file will be called and produce a lot of data under this folder. BTW, ...
KangDG's user avatar
  • 1
0 votes
0 answers
169 views

Pytest on relative paths

How to test the relative path using pytest base_path = Path(__file__).parent file_path = (base_path / "test.json").resolve() logger.info(file_path) f1 = open(file_path) json_load = json.load(...
mac34's user avatar
  • 11
0 votes
0 answers
39 views

How to import mixin file without giving it's location in sass?

See Line No. 1 and 2, it's easy to import mixin Now see this Line No. 1 and 2, it's not easy to import mixin file like this. Is there any way to solve this problem?
Luffy's user avatar
  • 1
1 vote
3 answers
659 views

How to use relative paths

I recently made a small program (.py) that takes data from another file (.txt) in the same folder. Python file path: "C:\Users\User\Desktop\Folder\pythonfile.py" Text file path: "C:\...
MasterProgrammer254's user avatar
0 votes
0 answers
92 views

How to access file independent from directory I run the binary file?

In my program I want to read file placed in specific sub directory of my repository. I use relative path to do so. But the problem is that if I execute my binary file from other directory it obviously ...
ralex's user avatar
  • 23

1
2 3 4 5
50