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
2
votes
3 answers

DOS CMD batch: Wrong full pathnames? (parameter extension ~f)

To list full pathnames of files in specified path I may use: FOR /F "tokens=*" %G IN ('DIR /B "path\*.*"') DO echo %~fG WRONG result: \*.* ss64.com says: "If a filename with no drive letter/path is expanded to display a drive…
endigo
  • 69
  • 3
2
votes
2 answers

Play sound file from within VBScript when msgbox appears

I am trying to play a sound file from within a VBScript when a certain msgbox appears. The only problem is that I will be sending this elsewhere and the person who receives it won't have the same pathname as the audio file that I want to play. I was…
Jared
  • 55
  • 2
  • 6
2
votes
3 answers

Checking if a file is in a given directory

I've got a situation where I'd like to check whether a particular path lands inside of a particular directory. My first instinct was to do something like filepath.HasPrefix(filepath.Clean(path), dir) but the procedure filepath.HasPrefix is…
Inaimathi
  • 13,853
  • 9
  • 49
  • 93
2
votes
1 answer

How write only once path_names on routes and make available for all of routes in Rails 4.1?

I want to turn my path_names translated only once, and turns he available for all of routes in the routes.rb. This is my routes.rb now: PATH_NAMES = { new: 'novo', edit: 'editar', show: 'ver' } Rails.application.routes.draw do devise_for :users,…
Bruno Casali
  • 1,339
  • 2
  • 17
  • 32
2
votes
0 answers

Getting full file path in windows

I have a series of full file name (Complete file path). Issue is that all character in file path are in lowercase. I need to transfer this list to Unix server where the path names are case sensitive. I need to get the case sensitive path name from…
Jitendra
  • 732
  • 1
  • 9
  • 29
2
votes
1 answer

Listing directory names with Unicode symbols in them isn't working correctly

I'm trying to write to a file a list of all the sub-directories, but the unicode symbols in the sub-directory names get replaced by question marks. I'm using CLISP 2.49 on Windows XP. Here is the short version of the code: (let ((*pathname-encoding*…
Hecatomb
  • 21
  • 1
1
vote
0 answers

TypeError : can't convert Pathname into String : Ruby

I am getting error while running following code in rails at line: @api_key = "XXXXX" api_secret = "XXXX" @opentok = OpenTok::OpenTokSDK.new @api_key, api_secret @opentok.api_url = 'https://staging.tokbox.com/hl' @session = @opentok.create_session…
Pratik Raj
  • 11
  • 1
1
vote
3 answers

How do I inherit from Pathname in Ruby?

I have a RemoteFile that inherits from Pathname class RemoteFile < Pathname end I create a remote file, and get its parent irb> RemoteFile.new('.') => # irb> RemoteFile.new('.').parent => # Is there…
Chris
  • 38
  • 3
1
vote
4 answers

jquery pathname and syntax

In order to load a page with ajax I have the following in my script file: $(".ajaxed").live("click", function(event) { var post_slug = $(this)[0].pathname.substring(1); alert(post_slug); $.address.crawlable(true).value(post_slug); …
Gab
  • 2,216
  • 4
  • 34
  • 61
1
vote
1 answer

Duplicate pathname issue in useLocation

I'm making a web with react and react router. The problem is, the pathname in useLocation() has a record of the previous page and a record of the current page. For example, '/' on the home screen and the '/business' page on another page are…
rudenick
  • 154
  • 1
  • 1
  • 10
1
vote
1 answer

Bash completion in function?

I currently have the following Bash function: function xcd { if [ "$#" -gt 1 ]; then echo "Usage: xcd []" >&2 return 1 fi cd "/some/commonly/used/path/${1}" } I'd like for this to…
joshlf
  • 21,822
  • 11
  • 69
  • 96
1
vote
1 answer

How to get the array object from a specific history.location.pathname

My issue is that when i call the function getAllFlashCardsFromQuest(), its call all flash cards ever created in all the pages, i wanna only the objects that comes from a specific pathname, or a way to filter the cards array. async function…
1
vote
1 answer

nodejs - get filename from url

I have this kind of link in my Node.js script: 148414929_307508464041827_8013797938118488137_n.mp4.m4a?_nc_ht=scontent-mxp1-1.cdninstagram.com&_nc_ohc=_--i1eVUUXoAX9lJQ-u&ccb=7-4&oe=60835C8D&oh=61973532a48cb4fb62ac6711e7eba82f&_nc_sid=fa I'm trying…
newbiedev
  • 2,607
  • 3
  • 17
  • 65
1
vote
1 answer

Golang Copy Tool

Hey if have been working on this copy tool as an exercise since I am totally new to Golang and programming. So far it does work in the way i want but I am trying to do fine cuts on it. The Tool asks for a source path and my Code adds an "\" for…
reX
  • 15
  • 2
1
vote
1 answer

nextjs dynamic routing problem with spaces

I meet a problem to access dynamic routes through a product name from my API when the name has spaces. I have no problem accessing routes when the product name is just one word. utils/api.js export async function getProduct(name) { const products…
Rom-888
  • 681
  • 2
  • 9
  • 30