directory

Displaying a links absolute location...

Is there any way I can display a links location absolutely when I only reference it relatively. I.e. A file is relatively referenced like... <a href='../../files/uploaded_file.jpg'>Your Uploaded File</a> But I would also like to display some text saying... You can link to your file via www.example.com/files/uploaded_file.jpg The c...

php realpath not producing usable outcome

<?php $server = $_SERVER["SERVER_NAME"]; $pathpath = realpath("../../files/uploaded_file.jpg"); echo "You can link to the file using the following link... $server$pathpath"; ?> Unfortunately this produces the following... www.example.com/home/fhlinux123/g/example.com/user/htdocs/ninja/base/files/1.doc Whereas what I am a...

Ruby Dir and File on remote server?

If I have a remote SFTP server with a folder full of files on it that I want to operate on with Ruby's Dir and File classes, is there a way to do that through the net/ssh and net/sftp libraries? I know that net/sftp has a few Dir and File utilities strapped to it, but unfortunately they're not the ones I need. I need File.ctime(my_file...

Batch file - Write list of files to variable

I'd like to get a list of all files (including their absolute path) into a variable, separated by spaces. My Google-fu seems to be weak in this regard, because I keep running into issues. I have a base directory stored in %baseDir%, and would like to parse it for files (not recursing or including sub-directories). Like I mentioned, th...

Upload/Download entire directory to Nexus through Maven

Is it possible to upload/download an entire directory and all of the sub-directories within it to/from a Nexus repository server? ...

Administrator receives PermissionDenied error when issuing get-childitem in Powershell

I am trying to backup a drive from a laptop that is defunct. This drive was pulled from the machine and mounted in an external enclosure and connected to a desktop via USB. Laptop that the drive was pulled from is Windows 7 Pro, and the desktop I connected the laptop drive to is Windows 7 Ultimate. I am running PowerShell on the deskto...

uploadify fails to upload files

I made a small script which basically uses jQuery uplodify to upload files to dynamically generated directories. It works fine on my localhost but does nothing on my remote test server. I inspected the traffic with fiddler and noticed the following warnings are issued: Warning: move_uploaded_file(/data/web/uploaded_videos/majid/file.tx...

How to get files in a relative path in C#

If I have an executable called app.exe which is what I am coding in C#, how would I get files from a folder loaded in the same directory as the app.exe, using relative paths? This throws an illegal characters in path exception. string [ ] files = Directory.GetFiles ( "\Archive\*.zip" ); How would one do this in C#? ...

How to programmatically search for a folder in a user's environment in C#?

I would like to be able to search for a folder by name within a user's files in C#. The reason for this is to enable a process which utilizes two applications that are otherwise not communicating with one another. (The process is essentially a file hand off, and the applications cannot communicate as one is a proprietary app). If this is...

How to find out mount/partition a directory or file is on? (Linux Server)

Is there a Linux command to easily find out which partition/mount a directory or file is on? (This is probably a RTFM question, and I feel guilty for asking it, but somehow, I can't find a good answer on google just yet..) ...

Environment.CurrentDirectory renders Wrong Path

I need to get to a certain file in my ASP.NET MVC project. Have two folders in my same Project, let's call them Main and Reference. From my Main, I am calling a class from my Reference.csproj file. From there, I need to get to my TargetFile, which also lives in the Reference folder. When I use AppDomain.CurrentDomain.BaseDirectory i ge...

Exporting diectory structure to csv/xl file

Hi all, my requirement is to enumerate all directories and specific .tif files (that are at the end of the structure). Sample is A (path selected from UI) <has> B<has> and C<has> D <has> E F G H I J K ...

Fast way to find the number of files in one directory on Linux

I am looking for a fast way to find the number of files in a directory on Linux. Any solution that takes linear time in the number of files in the directory is NOT acceptable (e.g. "ls | wc -l" and similar things) because it would take a prohibitively long amount of time (there are tens or maybe hundreds of millions of files in the dire...

PHP based Business/Product Directory App with CRM backend?

I'm involved in a project whose goal is to create a web based portal to allow consumers to to search a database of local services. The services are to be organized in categories, but raw search is also to be provided and should lead to a flexible presentation of the relevant services and also some "premium listings" in addition to organi...

Test for directory existence in C

I have a function that should create a directory. I want to test to make sure that the directory is created, and has the correct permissions I can't use lstat since I get EPERM when I do so (I assume I'm not supposed to know that much about a directory). So what else should I use? I can try to open it it with opendir, but that doe...

delphi - calculate directory size API?

hi, Anyone knows other way to get a directoy's size, than calculate it's size by counting file with file? I'm interested on some win32 API function. I've google it about this, but i didn't found relevant information so i'm asking here. Best regards, PS: I know how to calculate a directory size by using findfirst and findnext and sum...

Installing an empty directory with RPM

In my install section of my rpm Spec file I have a bunch of mkdir's to create the directories I need. The ones that don't have any files installed in them get pruned out in the end and don't end up getting created. How can I ensure that the empty directories get created when it is all said and done? ...

How to detect a directory is in use on Win32?

I need a programmatic way to know if a directory (as opposed to a file) is in use, for example because it is open on explorer or a CMD prompt. If the directory is in use, then it cannot be deleted. The current way I have found to do that is trying to rename it, is there a less intrusive way to do this under Windows? ...

xsl:for-each file in directory(common solution)

Hello, I found solution for subj related to the Visual Studio XSLT processor: public class XsltListFilesExtension { public XPathNodeIterator ListFiles(string directoryPath) { XmlDocument doc = new XmlDocument(); doc.AppendChild(doc.CreateElement("files")); DirectoryInfo di = ne...

Modify entry in OpenLDAP directory

Hi, I have a large Openldap directory. In the directory the display name property for every is filled but i need to modify these entry and make it like "givenName + + sn". Is there are way i can do it directly in the directory just like sql queries (update query). I have read about the ldapmodify but could not find the way to use it li...