path

Compiling C in Windows XP

Hi, I want to learn Vim editor and I'm trying to compile a C file. I've installed MinGW and I've added gcc.exe to System Path: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Arquivos de programas\TortoiseSVN\bin;c:\Arquivos de programas\Microsoft SQL Server\100\Tools\Binn\;c:\Arquivos de programas\Microsoft SQL Server\...

C# - Getting the folder name from a path

Hi Here is some code string path = "C:/folder1/folder2/file.txt"; What objects or methods could I use that would give me a result of folder2? Thank you in advance. ...

Sinatra on Ruby 1.9.2-p0

Hello, I'm quite new to Ruby language (up to now I developed in Groovy + Grails) but since I was curious about it I wanted to try Sinatra on Ruby 1.9.2-p0. I have a trivial website that is contained in /mywebpage and has 2 files: # blog.rb get '/' do 'Hello World!' end get '/impossible' do haml :index end and #config.ru path = ...

Shell script with whitespace in path executes differently depending on directory

I have made a script to open Spotify with wine: #!/bin/bash DIR="/home/jorgsk/.wine/drive_c/Program Files/Spotify/" cd "$DIR" wine spotify.exe 2>/dev/null I'm passing "$DIR" to cd with quotes because of the whitespace in "Program Files"; if I don't have the quotes "/home/jorgsk/.wine/drive_c/Programs" will be considered as the argumen...

First element of a path in python

Hey, I got a list of paths and I need to extract the first element of each path in a portable way, how would I do that? ['/abs/path/foo', 'rel/path', 'just-a-file'] to ['abs', 'rel', 'just-a-file'] Thanks in advance Oli ...

How to use server path to access a file for attachment

I am trying to access a file on another server from my application. Out of application, I am able to access the files from windows explorer, but when I am using the same path in my application, I am getting the error "Could not find a part of the path F:\Unknown\ABC\DEF\MNO\Fren.jpg". My code goes here.. String FilePath; FilePath = ...

Create file path from variables

Hello, I am looking for some advice as to the best way to generate a file path using variables, currently my code looks similar to the following: path = /my/root/directory for x in list_of_vars: if os.path.isdir(path + '/' + x): # line A print(x + ' exists.') else: os.mkdir(path + '/' + x) ...

Cutting a part of path

I have two paths: 'C:\ol\il\ek' and 'ek\mek\gr'. How can i cut the common part from these paths? I'm making one paths from them like that (h- first path, n - second path): ee.Load(h + "\\" + n); ...

How to force magento to use full product path?

Hi, I have a problem with magento product links. When I search a product and then click the product link, Magento redirects me to index.php/test666.html when it supposed to be index.php/products/grocery/miso-soup/test666.html. is it possible to force Magento use product's full path? Added: I can't get it to work by enabling 'Use Cate...

How can I extract a file path from a Perl string?

I want to find the file name with fullpath from this string "[exec] /snschome/sns/ccyp/mb_ccsns/bb/cbil5/v85_8/amdocs/iamcust/bil/cl/business/handlers/ClReportsHandler.java:233: cannot resolve symbol" I want to extract /snschome/sns/ccyp/mb_ccsns/bb/cbil5/v85_8/amdocs/iamcust/bil/cl/business/handlers/ClReportsHandler.java and I a...

Python not recognising directories os.path.isdir()

I have the following Python code to remove files in a directory. For some reason my .svn directories are not being recognised as directories. And I get the following output: .svn not a dir Any ideas would be appreciated. def rmfiles(path, pattern): pattern = re.compile(pattern) for each in os.listdir(path): if os....

How can I recognize Windows file paths in a string in Perl?

I have been doing some searching for a regex that can be used as a rule to disallow users entering windows file paths without escaping the "\". So far I have found this expression [^\\]*$ However, this fails for the following: C:\\Program Files\\testing By fails I mean that it does not validate this string. Any he...

How to make a batch work with long path names and spaces for a For Loop with subdirectories ?

How to make a batch work with long path names and spaces for a For Loop with sub-directories ? paths to files will be over 200 or 300 letters. What i m trying to do is to bulk convert multiple files with a program that let me insert the input file directory path+name and the output file directory path+name in a .INI that comes with the...

C# Cannot write to Application.ExecutablePath, some boxes i can some i cannot? uninstall from this...

So I have been writing to Environment.SpecialFolder.ApplicationData this data file, that upon uninstall needs to be deleted. I am using Innos Setup to build my installer. It works great for me. So my data file hangs out in the above path and I do that cause when I used to try to write it to Application.ExecutablePath certain bo...

ApplicationPhysicalPath in silverlight

Hi guys, string str = HtmlPage.Document.DocumentUri.AbsoluteUri; gives me http://localhost/MyApplication/Pages/Silverlight/SLMain.aspx but I just need the ApplicationPhysicalPath - in asp.net I can do HostingEnvironment.ApplicationPhysicalPath to do that, but I don't know how to do that for silverlight. Any hints? Thanks, Voodoo ...

Add Reference VS 2008 strange issue with paths

I have VS 2008 Team Suite, and use TFS. I have references in 2 folders in TFS: path in TFS: $Arquitectura\Main\ReferenciasFrk\Release\ mapped to: C:\Trabajo\Arquitectura\Main\ReferenciasFrk\Release\ path in TFS: $Arquitectura\Main\Referencias Externas\ mapped to: C:\Trabajo\Arquitectura\Main\Referencias Externas\ I have project cspr...

How is the PATH env variable set when opening a BASH shell in Terminal.app on OS X?

What startup scripts—in the order that they are called—set the PATH variable when opening a BASH shell in Terminal.app on OS X? ...

permissive equality test on string

Hi, I'm a python newbie with a problem too hard to tackle. I have a string defining a path, were all the spaces have been converted to underscores. How can I find if it corresponds to a real path? e.g. a string like /some/path_to/directory_1/and_to/directory_2 with a real path: /some/path_to/directory 1/and_to/directory 2 notice that ...

Does File exist in Python?

Possible Duplicate: Pythonic way to check if a file exists? How can Check if file exist with python 2.6? If file exists run exec redo.py. If file does not exists exec file start.py The file is a 0kb, but name Xxx100926.csv Ans seems to be from os path import exists from __future__ import with_statement if exists('...

Dynamic MC's path with localToGlobal Problems

I'm adding several instances of an MC (bread_mc) into a container MC (wall_mc). wall_mc has been added to a shop class and that is where i'm called the rest of my functions from. Also the wall_mc is scrolled left and right with mouseX & mouseY values. I've set up a function to add the bread_mc to the wall at different x/y positions. Fu...