Questions tagged [pathname]

Anything related to pathnames. A pathname is a symbolic, hierarchical representation of the location of a file (or other resource) in a filesystem encoded as a string. The rules governing the syntax of pathnames differ among OSes (and sometimes among filesystems). Here is an example for Linux: "/home/user/foo/bar/hello.pdf" and one for Windows: "D:\data\foo\bar\hello.pdf"

189 questions
0
votes
2 answers

android how to get the path name of the drawable

How do I get the path name to the drawables in my resource folder? I am trying to get the image in my resource folder and pass it to the function to decode it. the path "android.resource://com.myapp.example/"+ R.drawable.image" didnt works. …
Yachee
  • 1
  • 1
  • 1
  • 3
0
votes
1 answer

SQL SERVER get hostname and path but not parameters

I have to get the hostname & pathname from an URL using regular expression. URL can be in the form of a) http://test.com/mary/archive/project.aspx --> I want http::/test.com/mary b) http://www.testmary.com/company --> I want…
user2726975
  • 1,285
  • 3
  • 17
  • 26
0
votes
2 answers

match pathname within double-zero-byte-separator input file

I am improving a script listing duplicated files that I have written last year (see the second script if you follow the link). The record separator of the duplicated.log output is the zero byte instead of the carriage return \n. Example: $> tr '\0'…
oHo
  • 51,447
  • 27
  • 165
  • 200
0
votes
0 answers

JS alert for particular location href/pathnames

Hi :) I'm a bit new to Javascript and Jquery in general, so I apologize if the question may seem confusing and whatnot. I'm running a roleplaying forum (on the Jcink forum host), and I wanted some parts of the forum (which are technically…
0
votes
2 answers

Is there some shell full path function?

Is there some native function(shell, linux command) to merge/compute the full path? example: old_path="~/test1/test2/../dir3//file.txt" new_path=FUN($old_path) echo "$new_path" // I want get this "/home/user/test1/dir3/file.txt"
Yifan Wang
  • 504
  • 6
  • 13
0
votes
2 answers

Print the pathnames of folders and their subfolder recursively

I'm trying to print the pathnames of every file and its subfolders in a folder This is the code I have so far: def traverse(path, d): for item in os.listdir(path): item = os.path.join(path, d) try: traverse(path,d) …
Bob
  • 539
  • 2
  • 5
  • 11
0
votes
2 answers

PHP: retrieving full path from a selected file to import data to database

I want to allow the user to select a file from which data is exported and saved into a database. I found the following code to import the data: $fp = fopen("people.csv", "r"); while ($line = fgets($fp)) { $char = split("\t",$line,4); list($name,…
batsta13
  • 549
  • 2
  • 12
  • 26
0
votes
1 answer

OSX - pathname for file outside Sites folder

I've set up a local Git repository outside my Sites folder. In hindsight, this was possibly a mistake. I want to test one of the Git files, but my test html page needs to be inside the Sites folder to run with Apache under ~localhost. So can I get…
Nick
  • 5,995
  • 12
  • 54
  • 78
0
votes
1 answer

java path to file on server must double backslah

I have a Java GUI. The user selects with the JFileChooser Dialog a file including the path to the file. The path is displayed in a text box, e.g. \\developDB\directory\subdirectory\file.info When I access the file with an InputStream using the…
Guido
  • 926
  • 2
  • 10
  • 19
0
votes
4 answers

If statement not work jquery

I have this url: csumb/index.php?page=consultanta I try to compare 2 links but this code do the same thing if I change my link and I refresh the page. var pathname = window.location.pathname; var a =…
-1
votes
2 answers

Forced to enter full pathname every time instead of just file name

Every time I try to do an action such as running a program in the VScode Terminal (also happens in PyCharm) I have to enter in the full pathname instead of just the file name. For example, instead of just doing python3 test.py to run a program, I…
Rishad
  • 53
  • 1
  • 1
  • 5
-1
votes
1 answer

How best to convert an array of string paths to JSON?

I need to convert an array of string paths into nested JSON without duplicates. I'm trying to build a JSON file from an array of string paths. When building the JSON I'd like duplicate folder names to be nested (i.e. "catalog" would have "product"…
Ray
  • 225
  • 2
  • 7
-1
votes
3 answers

Setting up an if statement with window.location.origin in JS

I am looking to delete my navigation menu on the landing page of a site I am building. However, I can't figure out how to ONLY target that page. The way I do it with the other pages, is that I write (window.location.pathname.includes("/pathname"))…
-1
votes
1 answer

How do I open one Excel file from another without including the current user in the pathname?

I am working on multiple Excel files with colleagues, using Dropbox to collaborate. We all have Dropbox integrated with Finder on our Macs. I want to be able to open one file by clicking on a link in another file - I've tried using the hyperlink…
csmith848
  • 1
  • 1
-1
votes
3 answers

How to combine pathname with URL strings

I'm setting up javascript that contains pathname for multiple URLS, but I don't want to set up a new "case" for the continual URL string. Is there any possible solution to combine pathname cases instead of creating a new one? switch…
Grets
  • 31
  • 9
1 2 3
12
13