Search Results

Search found 3168 results on 127 pages for 'directories'.

Page 13/127 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • How to get the newest (last modified) directory [C#]

    - by Shaitan00
    Currently my application uses string[] subdirs = Directory.GetDirectories(path) to get the list of subdirectories, and now I want to extract the path to the latest (last modified) subdirectory in the list. What is the easiest way to accomplish this? (efficiency is not a major concern - but robustness is)

    Read the article

  • Is there an easier way to reconcile a list of files and a directory with subfolders/files to find ch

    - by rwmnau
    I have a SQL Server table with a list of files (path + filename), and a folder with multiple layers and files in each layer. I'm looking for a way to reconcile the two without having to process the list twice. Currently, I'm doing this: For Each f as FileInfo In FileListFromDatabase If f.Exists is False, mark it as deleted in the database Next For Each f as FileInfo In RecursiveListOFFilesOnDisk If Not FileExistsInDatabase, then add it Next Is there a better way to do this? I'd like to avoid converting all the matching files (of which most will be) to FileInfo objects twice. Since I'm a T-SQL developer first, I'm picturing something like an OUTER JOIN of the two lists where they don't match. Something LINQ-ish?

    Read the article

  • Base URL in ASP.net Master Pages with virtual Directories

    - by Ian
    Hi All, I have an ASP.net master page. In this master, I have all my css and javascript files defined. I also have a few images and a few buttons and hyperlinks. All the urls are all declared as relative ie "/scripts/ian.js" Everything works fine if this site is the root website, but I need it to work in a virtual directory. My problem is when I place this website in a virtual directory under a root site, all my links are pointing to the root site. so my links point to www.root.com/scripts/ian.js but it should be pointing to www.root.com/virtualDir/scripts/ian.js I thought the Base Href tag in the header would help, but so far it does not seem to be helping in anyway. All the links are still pointing to the root website when i hover over them. Any suggestions or ideas are welcome. Thanks

    Read the article

  • AppDomain dependencies across directories

    - by strager
    I am creating a plugin system and I am creating one AppDomain per plugin. Each plugin has its own directory with its main assemblies and references. The main assemblies will be loaded by my plugin loader, in addition to my interface assemblies (so the plugin can interact with the application). Creating the AppDomain: this.appDomain = AppDomain.CreateDomain("AppDomain", null, new AppDomainSetup { ApplicationBase = pluginPath, PrivateBinPath = pluginPath, }); Loading the assemblies: this.appDomain.Load(myInterfaceAssembly.GetName(true)); var assemblies = new List<Assembly>(); foreach (var assemblyName in this.assemblyNames) { assemblies.Add(this.appDomain.Load(assemblyName)); } The format of assemblyName is the assembly's filename without ".dll". The problem is that AppDomain.Load(assemblyName) throws an exception: Could not load file or assembly '[[assemblyName]], Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. All of the dependencies of [[assemblyName]] are: Inside the directory pluginPath, The myInterfaceAssembly which is already loaded, or In the GAC (e.g. mscorelib). Clearly I'm not doing something right. I have tried: Creating an object using this.appDomain.CreateInstanceAndUnwrap inheriting from MarshalByRefObject with a LoadAssembly method to load the assembly. I get an exception saying that the current assembly (containing the proxy class) could not be loaded (file not found, as above), even if I manually call this.appDomain.Load(Assembly.GetExecutingAssembly().GetName(true)). Attaching an AssemblyResolve handler to this.appDomain. I'm met with the same exception as in (1), and manually loading doesn't help. Recursively loading assemblies by loading their dependencies into this.appDomain first. This doesn't work, but I doubt my code is correct: private static void LoadAssemblyInto(AssemblyName assemblyName, AppDomain appDomain) { var assembly = Assembly.Load(assemblyName); foreach (var referenceName in assembly.GetReferencedAssemblies()) { if (!referenceName.FullName.StartsWith("MyProject")) { continue; } var loadedAssemblies = appDomain.GetAssemblies(); if (loadedAssemblies.Any((asm) => asm.FullName == referenceName.FullName)) { continue; } LoadAssemblyInto(referenceName, appDomain); } appDomain.Load(assembly.GetName(true)); } How can I load my plugin assembly with its dependencies in that plugin's directory while also loading some assemblies in the current directory? Note: The assemblies a plugin may (probably will) reference are already loaded in the current domain. This can be shared across domains (performance benefit? simplicity?) if required. Fusion log: *** Assembly Binder Log Entry (12/24/2010 @ 10:46:40 AM) *** The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified. Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Running under executable C:\MyProject\bin\Debug\MyProject.vshost.exe --- A detailed error log follows. LOG: Start binding of native image vshost32, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=x86. WRN: No matching native image found. LOG: Bind to native image assembly did not succeed. Use IL image. LOG: IL assembly loaded from C:\MyProject\bin\Debug\MyProject.vshost.exe

    Read the article

  • Why can't WordPress create directories when uploading themes?

    - by Arman
    I can't workout how to solve this problem so wordpress would let me upload themes. I have a fresh copy of Fedora 17 installed on my dev machine. I then installed mysql using: yum install mysql mysql-server. Next I installed WordPress which also installs apache and php: yum install wordpress I can go to http://localhost/wordpress and see WordPress working. But when I try tried to install my theme it asked for ftp credentials. I then updated the wp-config.php file and set the FS_METHOD constant to direct. Now it doesn't ask for ftp credentials but it gives me this error: Could not create directory. /usr/share/wordpress/wp-content/themes/my-theme-name/ httpd service is running under 'apache' user and 'apache' group. The /usr/share/wordpress/ directory is recursively own by 'apache' user and 'apache' group too. I've even set the permissions to 777 (also recursively) and even then I keep getting the same error as above. How can I solve this problem?

    Read the article

  • How can I capture GNUMake differences between two directories

    - by WilliamKF
    I have a tricky issue with gmake, when I build from the parent directory, something is different and the make does not build all the .o(s) it needs and fails, but if I cd to the directory and do a make it builds them fine. How can I get GNUmake to tell me the difference between these two runs? There must be some make variables set in the parent that break the child, but I need help figuring out how to track them down.

    Read the article

  • OpenFileDialog directing to a file 2 directories back

    - by steve
    I'm having problems in visual basic programming. Currently I open a file using an open file dialog window and navigating to a file to open it. I want to be able to write a simple line saying ( and this is the best way I can describe it), Open this file "....\users.text". Please can someone help?

    Read the article

  • ASP.NET MVC 2 IgnoreRoute in all directories

    - by awex
    Hi, I switched from MVC 1 to MVC 2. I am using a file.axd httphandler in my application and I set routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); in my global routing. Since MVC 2 MVC only ignores requests to /file.axd but not to /folder/file.axd. Any changes in MVC 2? I just want to make sure that all requests in any folder to any .axd file will get processed by my httphandler. Thanks!

    Read the article

  • What directories do the different Application SpecialFolders point to in WindowsXP and Windows Vista

    - by Thorsten Lorenz
    Namely I have: Environment.SpecialFolder.ApplicationData Environment.SpecialFolder.CommonApplicationData Environment.SpecialFolder.LocalApplicationData I am unclear as to were these point to in Windows XP and/or Windows Vista. What I found so far is that the ApplicationData points to the ApplicationData Folder for the current user in XP and the roaming application data folder in Vista. I would also like to know if there are general guidelines on when to use which.

    Read the article

  • Serving files inside of directories with ruby and mongrel

    - by AdamB
    I made a simple web server in Ruby using the Mongrel gem. It works great for files in a single directory, but I run into some path issues when inside a directory. Lets say we have 2 files in a directory named "dir1", "index.html" and "style.css". If we visit http://host/dir1/index.html, the file is found, but style.css isn't because it's trying to load "style.css" from http://host/style.css instead of inside the directory. index.html is trying to load style.css as if its in the same directory as itself. <link href="style.css" rel="stylesheet" type="text/css" /> I can get the file if I enter the full path of style.css: /dir1/style.css but it doesn't seem to remember it's already inside a directory and that no path before a filename should serve from the current directory. This is the ruby code im using to serve out files. require 'rubygems' require 'mongrel' server = Mongrel::HttpServer.new("0.0.0.0", "3000") server.register("/", Mongrel::DirHandler.new(".")) server.run.join

    Read the article

  • How can I quickly enumerate directories on Win32?

    - by BillyONeal
    Hello everyone :) I'm trying to speedup directory enumeration in C++, where I'm recursing into subdirectories. I currently have an app which spends 95% of it's time in FindFirst/FindNextFile APIs, and it takes several minutes to enumerate all the files on a given volume. I know it's possible to do this faster because there is an app that does: Everything. It enumerates my entire drive in seconds. How might I accomplish something like this?

    Read the article

  • php scandir --> search for files/directories

    - by Peter
    Hi! I searched before I ask, without lucky.. I looking for a simple script for myself, which I can search for files/folders. Found this code snippet in the php manual (I think I need this), but it is not work for me. "Was looking for a simple way to search for a file/directory using a mask. Here is such a function. By default, this function will keep in memory the scandir() result, to avoid scaning multiple time for the same directory." <?php function sdir( $path='.', $mask='*', $nocache=0 ){ static $dir = array(); // cache result in memory if ( !isset($dir[$path]) || $nocache) { $dir[$path] = scandir($path); } foreach ($dir[$path] as $i=>$entry) { if ($entry!='.' && $entry!='..' && fnmatch($mask, $entry) ) { $sdir[] = $entry; } } return ($sdir); } ?> Thank you for any help, Peter

    Read the article

  • Finding duplicate files by content across multiple directories

    - by gagneet
    I have downloaded some files from the internet related to a particular topic. Now I wish to check if the files have any duplicates. The issue is that the names of the files would be different, but the content may match. Is there any way to implement some code, which will iterate through the multiple folders and inform which of the files are duplicates?

    Read the article

  • SharePoint Virtual Directories Sitemap

    - by Edison
    I have created and asp.net web site utilizing a web.sitemap file to help with navigation. The site needs to be deployed within a virtual directory inside of our SharePoint intranet site. The problem that I am running in to is that when I request the SiteMap.CurrentNode property, it is returning information from SharePoint's sitemap. Specifically, when i try to get my sitemap's title or description, I am getting information from SharePoint. I have tried re-naming my sitemap and declaring a new Sitemap provider within the web.config. After creating the new sitemap provider and requesting the SiteMap.currentNode, I receive an error message saying that it can't find the web.sitemap file. Any help you can provide would be greatly appreciated.

    Read the article

  • python __import__() imports from 2 different directories when same module exists in 2 locations

    - by programer_gramer
    Hi, I have a python application , which has directory structure like this. -pythonapp -mainpython.py -module1 -submodule1 -file1.py -file2.py -submodule2 -file3.py -file3.py -submodule3 -file1.py -file2.py -file5.py -file6.py -file7.py when I try to import the python utilities(from mainpython.py) under submodule3 , I get the initial 2 files from submodule1.(please note that submodule1 and 3 have 2 different files with the same name). However the same import works fine when there is no conflict i.e it correctly imports file 5,6,7 from submodule3. Here is the code : name=os.path.splitext(os.path.split("module1\submodule3\file1.py")[1])[0] -- file1.py name here is passed dynamically. module = import(name) //Here is name is like "file1" it works(but with the above said issue, though, when passes the name of the file dynamically), but if I pass complete package as "module1.submodule1.file1" it fails with an ImportError saying that "no module with name file1" Now the question is how do we tell the interpreter to use only the ones under "module1.submodule3.file2"? I am using python This is really urgent one and I have run out of all the tries. Hope some experienced python developers can solve this for me?

    Read the article

  • Listing directories in Linux from C

    - by nunos
    I am trying to simulate linux command ls using linux api from c. Looking at the code it does make sense, but when I run it I get "stat error: No such file or directory". I have checked that opendir is working ok. I think the problem is in stat, which is returning -1 even though I think it should return 0. What am I missing? Thanks for your help. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <dirent.h> #include <sys/stat.h> #include <errno.h> int main(int argc, char *argv[]) { DIR *dirp; struct dirent *direntp; struct stat stat_buf; char *str; if (argc != 2) { fprintf( stderr, "Usage: %s dir_name\n", argv[0]); exit(1); } if ((dirp = opendir( argv[1])) == NULL) { perror(argv[1]); exit(2); } while ((direntp = readdir( dirp)) != NULL) { if (stat(direntp->d_name, &stat_buf)==-1) { perror("stat ERROR"); exit(3); } if (S_ISREG(stat_buf.st_mode)) str = "regular"; else if (S_ISDIR(stat_buf.st_mode)) str = "directory"; else str = "other"; printf("%-25s - %s\n", direntp->d_name, str); } closedir(dirp); exit(0); }

    Read the article

  • Gitosis Directories of repositories per user?

    - by Ibrahim
    I was just wondering, is there a way to set up gitosis so that a user would have their own directory to which they could push any number of repositories that they want, and essentially have admin privs on that directory? This might be kind of confusing, but essentially I want something like how on github all your repositories are accessible at urls like [email protected]:username/repofoo.git . I realize that setting up each repo is a somewhat manual process that could be automated via a script, like I assume github does, but is there any way to do something like this overall, minus the automated repository creation? I guess I'm open to trying to set up gitorious or something if it allows this, but gitosis works pretty well for me right now and it was dead easy to set up, and I've heard that gitorious is not so easy. Thanks! I've heard of other forks/clones of gitosis that have per branch permissions like gitolite, but I'm not sure whether I want to use one of those unless they have other compelling features and are as well documented and easy to use as gitosis.

    Read the article

  • Stop Search param in directories by grep immediately after param match

    - by yael
    hi friends I use the following command to find under /var some param in my script grep -R "param" /var/* 2/dev/null |grep -wq "param" my problem is that: after grep find the param in file grep continue to search until all searches under /var/* will completed How to perform stop immediately after grep match the param word For example when I run the: grep -R "param" /var/* 2/dev/null |grep -wq "param" grep find the param after one second. But grep continue to sears other same param and its take almost 30 seconds How to stop the grep immediately after param match? THX

    Read the article

  • archiving (ubuntu tar) hidden directories

    - by broiyan
    tar on a directory "mydir" will archive hidden files and hidden subdirectories, but tar from within "mydir" with a wildcard will not. Is this a longstanding and known inconsistency or bug or is it that hardly anybody ever looks inside a lengthy tar log long enough to notice? Edit (additional information): tar from within "mydir" with a wildcard will not "see" nor archive hidden files and hidden subdirectories in the immediate directory, with emphasis on "immediate". However, in subdirectories of "mydir" (obviously non-hidden) hidden files and hidden subdirectories will be archived.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >