Programming :: Specifying A File Path In IDL?
Jul 19, 2010
I've been dabbling in IDL lately, and it seems useful enough, but occasionally I come across a problem like this: I'm trying to call an IDL procedure from within an IDL script which is called from a .csh script. (Don't ask, trust me, you don't want to know.) The IDL procedure may or may not be in the same directory as the .csh, so I'm calling it by it's full path: /home/ic/rad_sim However, all IDL will do is give me a syntax error and tell me ic is an undefined variable. Putting ic in double quotes makes the undefined variable error go away, but it still reports a syntax error.
View 13 Replies
ADVERTISEMENT
Oct 28, 2010
Is there a way to get the full path of a file in C? I have a method that accepts a file name as an argument and is supposed to read the content of the file. The file name might include "../" so this might lead to accessing files outside of the current directory. I tried to use fstat but I could not figure out how to get the full path.
[code]...
View 3 Replies
View Related
May 11, 2011
I'm fighting my way through JAVA. But have hit another wall. Basically I need to to set paths in java so it can set/read files/director for Linux,Mac and windows.
The tutorials I'm using says to do this through the FileSystems class eg
Code:
However this reports it is missing, so a look on line says I need the headers so I set them with
Code:
This gives the following error
This has me totally confused as the tutorial shows this and checking online shows this, do I need to link in libraries or something like that?
I'm using the latest Ubuntu 11.04 and netbeans.
View 4 Replies
View Related
Jul 19, 2011
Is there any API to get partition name based on file path in C on Linux OS?
View 1 Replies
View Related
Jul 25, 2011
I am assigning a file path to a variable like
$1 means it should accept some file name from cmd prompt but in my case its not working.
View 1 Replies
View Related
Jun 13, 2010
I wanted to read out the absolute file-path (filename) as sorted in a folder (on Linux). The reading the file-paths is ok but I have problems in sorting.
Code:
selectedDirectory = fl_dir_chooser ("Select Imagedirectory:",NULL,0); //This is just a widget to show the folder.
DIR *d;
dirent *de;
[code]....
The files -105.dcm, -106.dcm, -107.dcm lie in the folder at the bottom and -36.dcm, -37.dcm- at the top. The program compares 1 and 3 of 105 and 37, 1 is lesser than 3, then prints out first, but does not know that 105 is three digits and 37 is two digits.
View 1 Replies
View Related
Jul 19, 2010
I am trying to replace the default path in a file(which is a script)with the new path which I have get when the bash script runsThe code is
SCRIPT=$(readlink -f $0)
SCRIPTPATH=`dirname $SCRIPT`
sed -i "s/$HomeDir/$SCRIPTPATH/g" <filename>
[code]....
View 4 Replies
View Related
Jul 26, 2013
How do you set up a command just to copy a file's full path name (%F) onto the clipboard?(I can't seem to get this without copying the contents of the file.)
View 2 Replies
View Related
Jul 17, 2009
Java applet not loading image with relative path(e.g. images/1.jpg) but loads image with absolute path(i.e. from /root/user/images/1.jpg) . This is a problem when i want to host the applet on web server
View 2 Replies
View Related
Oct 7, 2009
I'm new to UNIX scripting; I�m stuck with the following I have an Oracle SQL script that takes three parameters
1- File Name
2- File Path
3- File creation date
Under UNIX I have a folder where files will be placed frequently and I need to upload those files to Oracle, what I need is a UNIX script that can do the following
Loop through Directory "/home/applmgr/snktmp"
Picks only files
Pass the file name to parameter &1
[code]....
Is the above possible? I already knows how to call the Oracle Script from UNIX Im only stuck on writing the UNIX part where it List the files attribute(name,path,date) and store them to parameters ,Looping until the last file in the directory If the above is not possible,then how can I create the below from the command line
Filename{concatenation Mark}filePath{concatenation Mark}creationdate
Filename{concatenation Mark}filePath{concatenation Mark}creationdate
Filename{concatenation Mark}filePath{concatenation Mark}creationdate
Filename{concatenation Mark}filePath{concatenation Mark}creationdate
View 4 Replies
View Related
Oct 8, 2010
I use this command:
Code:
find ./ -atime +360
to figure out the files that haven't been accessed since 360 days. The command above will return results like this:
Code:
/uploads/2010/02/some-file-name.ext
/uploads/2009/08/another-file-name.ext
... etc
I'm taking here about tins of directories, thousands of files. I'm looking to find a command that makes me able to move the results above to another path, and to create that path once it doesn't exist like below:
Code:
mv /uploads/2010/02/some-file-name.ext /old-files/uploads/2010/02/some-file-name.ext
But I want the executed command to create this path
Code:
/old-files/uploads/2010/02/
If it doesn't exist.
View 6 Replies
View Related
Aug 13, 2010
Does anyone know how to get the path with a inode number by C programming?
Or can I get the absolute path without giving a "path" but a inode number by C?
like this: get_path(unsigned inode);
not such this function: getcwd(".", xxx);
taowuwen@gmail.com
View 7 Replies
View Related
May 28, 2010
I have asked this over on Launchpad and have found bugs filed on the eclipse bug tracker but it seems to be going nowhere so I guess ill ask here.
I am using Eclipse for some development work and having saved a file, defocus the eclipse window (to test changes in a browser) when I refocus the eclipse window I get the following error...
The file 'path omyfile' has been changed on the file system.Do you want to replace the editor contents with these changes?
I have searched and searched and this seems to be a CIFS/SAMBA problem. I even found one solution suggesting that changing his mounts from cifs to smbfs fixed his problem however that would appear not to be an option for me since using smbfs in the fstab causes cifs mounts. This problem would seem to occur in Bluefish as well as some other IDE's so it is not an Eclipse issue.
---------- LINKS TO RELATED ----------
Launchpad Question
Eclipse Bug
--------------------------------------
View 2 Replies
View Related
Jun 3, 2010
I had a situation in which the the path of the file to be copied is written in other file and I had to copy it using shell script..I can use cp $(cat /home/robert/location.txt) /media/sda1 on normal linux shell...But I am using buildroot script where $(cat /home/robert/location.txt) evaluate to nothing..is just blank..
View 1 Replies
View Related
Nov 24, 2010
I have just installed SABnzb application in my home folder. The executable file is SABnzb.py When I run the command in the Konsole # python SABnzb.py I have this Quote: python: can't open file 'SABnzbd.py': [Errno 2] No such file or directory
View 5 Replies
View Related
Jan 16, 2011
I found the following function in /etc/profile file.
[Code]...
1. I dont undestand what "if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)"" this if statement actually comapres??
2. Also what is the difference between PATH=$PATH:$1 & PATH=$1:$PATH
View 14 Replies
View Related
Feb 28, 2010
How to find filename and file path from a string
View 7 Replies
View Related
Jan 27, 2011
I have file which consists of many files with their path,i need to check for the file exists in the given path,how to check?
View 12 Replies
View Related
Aug 13, 2010
Does executable file contains the precise path to SO file? Should it be compiled with precise knowing of SO file location?
View 8 Replies
View Related
Feb 19, 2011
I have thousands files in thousands subfolders. All subfolders are named differently, but all files named like:
I have to replace "AAA_000" with the path of the file.
For example if I have a file AAA_000_001.tif in Foled/sub1/sub2, I have to rename AAA_000_001.tif to Foled/sub1/sub2_001.tif (or Folder_sub1_sub2_001.tif)
So far I have this script:
It can replace all AAA of all files in all subfolders with BBB, but I did not find a way to replace it with the path.
View 6 Replies
View Related
Jun 8, 2010
I'm the server guy which is why I don't know this, but were staging a new webserver and we use some custom perl scripts and as were moving the site over for testing, apache is blowing a perl error;Can't locate web.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/mcp/htdocs/cgi-bin/newgraph.gif line 11.,Now I can copy that file local, but there are a bunch of things, so the question is how do you globally add a folder to the perl search path
View 1 Replies
View Related
Apr 2, 2009
I have made the installation of Qt4 in my Fedora/MacBookPro. It also got a first compiling and running a simple program. The point is that for the compiler to run I need to point out every time where the bin is located, as that:
$ /home/threader/kinetic/bin/qmake -project
I have tried the following, but it still doesn't work:
# script
#-----------------------------------------------------------#
# /etc/bashrc or /home/threader/.bash_profile
# config to Qt compiler
[code]....
View 5 Replies
View Related
May 5, 2010
I'm using bash scripting to find any file that matches a path governed by the following regular expression:
"(monthly|nightly).[0-9]+/home/(user1|user2)/.mailbox/"
to match files like:
monthly.9/home/user1/.mailbox/l23131564
nightly.15/home/user2/.mailbox/cur/6546213
I've tried:
Code:
myRegex="(monthly|nightly).[0-9]+/home/(user1|user2)/.mailbox/"
find ./ -regextype posix-egrep -regex $myRegex
and it just spins and never gives me an answer, even though the file structure isn't that big.
View 8 Replies
View Related
Jul 30, 2010
I want to share file locations with pc users (i'm a mac user). problem is: mac uses fslash, while pc files are indicated with baskslashes. I'm looking for a automation/plugin/shortcut/... to change them quick. I use paths a lot and share them with pc users, so manually it's to time consuming.
View 2 Replies
View Related
Jun 30, 2010
I'm still going through "Agile Web Development with Rails" (Beta version), and I'm confused as to why some code in the book is not working for me. Following their example code in the book, I created code like so:
Code:
$ rails demo
# ...
$ cd demo/
$ script/generate controller Say index hello goodbye
exists app/controllers/
[code]...
After starting the server, I can view the index view and the other views just fine. But then I have trouble if I add this code to any of the view html templates:
Code:
<p><%= link_to "Hello", say_hello_path %></p>
I'm told this is supposed to generate a link to the say/hello view. But instead I get an error message like so:
Code:
undefined local variable or method `say_hello_path' for #<ActionView::Base:0xb6ce3090>
If I edit it to
Code:
<p><%= link_to "Hello", Say_hello_path %></p>
then I get
Code:
uninitialized constant ActionView::Base::CompiledTemplates::Say_hello_path
But I haven't noticed anything in the book so far indicating that I am supposed to initialize these constants or how I am supposed to do it.
View 1 Replies
View Related
Jul 15, 2010
I am trying to execute executable files in bash without adding ./ I know there must be an alias to add in .bashrc, that must be something like alias PATH=$PATH:. But this seems not to be working.
View 1 Replies
View Related
May 29, 2011
i'm trying to run some code i had written a couple of weeks ago in windows :$, the program has to create and copy some files and when i try to run this code in monodevelop this error:Unhandled Exception: System.UnauthorizedAccessException:Access to the path '/tmp' is denied.i've tried to change the path where i know i have read/write permissions but it doesn't seem to work, the code was originally written to create a file in the Temp folder in windows.
View 1 Replies
View Related
Apr 17, 2009
I'm trying to pass a path as a string to an array, but its evaluating it as a command instead. I want to take the literal string "/mnt/accounts/user/temp/*.jpg" and assign it to an array{1}, but when i echo the array variable, it displays it as
pic1.jpg
pic2.jpg
pic3.jpg
[code]....
I just want it to be the actual text "/mnt/accounts/user/temp/*.jpg" which i will be combining with other text to create a longer path elsewhere in the code.
View 5 Replies
View Related
Feb 5, 2010
We have a custom app that runs on boot on some older hardware running DSL linux, and their startup manager was quite simple. We purchased some newer Asus eeebox's which run xandros and things are quite stable and run nice with 1 exception.The application only runs from the root (/) location. This box auto logs in as 'user' and there is a /home/user/.kde/Autostart folder where you can stick scripts to run at boot. So I have a start.sh script, and with little bash programming tried things such as;
sudo cd /
sudo /startapp.pl
but the errors start spewing with the basic;can't find data/xyz as it's looking in the local.I thought there was a basic cwd (change working directory) but everything I try just forces the run from that location.Any ideas or suggestions are appreciated, but things like can you change the code, etc. can't be done, so it must be a programming thing. The only other thought I had but not sure, can you do a cronjob with @boot or something, that when the box starts, it can run this job as root and fire off?
View 3 Replies
View Related
Apr 11, 2009
I am programming in bash and really stuck finding directory names. I have a script to find all the .php files on my / partition which will return the whole path. Is there a way to print directory hierarchy with all those values leaving out the forward slashes.
View 10 Replies
View Related