directory

Display directory structure with size in Powershell

Trying to have "dir" command that displays size of the sub folders and files. After googling "powershell directory size", I found thew two useful links Determining the Size of a Folder http://technet.microsoft.com/en-us/library/ff730945.aspx PowerShell Script to Get a Directory Total Size http://stackoverflow.com/questions/809014/pow...

Why do I get a number instead a list of filenames from readdir?

I have a piece of Perl code for searchnig a directory and display the contents of that directory, if match is found. The code is given below: $test_case_directory = "/home/sait11/Desktop/SaLT/Data_Base/Test_Case"; $xml_file_name = "sample.xml" $file_search_return = file_search($xml_file_name); print "file search return::$file_search_re...

How to configure an extra/different migrations folder

Hello. Me and a colleage are working in different projects that share some models. So, we are sharing the models thru a git submodule. Additionally, we'd like to be able to also share migrations: In this way, my collegue's migrations would be in the folder db/migrate/other_db of my project. How can I configure rails migrations to also...

In Ruby, how do you list/sort files before folders in a directory listing?

I have to following code in ruby: <% files = Dir.glob('/**/*') files.each do |file| puts file end %> It outputs (for example): /dirA/file1.txt /dirA/file2.txt /dirB/file1.txt /file1.txt /file2.txt /subdirA/file1.txt I want it to output it like this: /file1.txt /file2.txt /dirA/file1.txt /dirA/file2.txt /dirB/file1.txt /s...

How to read Windows loged in username with PHP/IIS

Hello I am runnig a network. Here I have a domain controller (DC) I just installed IIS6 , PHP and Mysql on it. every thing is working fine.:) Now I want to bring up a script on this local website. The first problem is that I want to detect which one of network users (active directory users) are logged in with PHP. I mean it is enough f...

Gcc.exe: CreateProcess : No such File or directory - Error?

Hello, I am writing an Objective C program and i saved it as 'hello.m'. The problem is when i am trying to compile it usig MinGW it is giving an error gcc hello.m // i used for compiling and it is giving following error gcc.exe: CreateProcess : No such File or directory is there any way to fix ..so that i can move forward.. Thank Y...

XSL, get current working directory

I'm looking for a concrete example of an XSL stylesheet storing the current working directory into a variable. I need this because in my situation, I need to import certain library stylesheets using a relative path. Knowing the path my processor is choosing as the current directory would be sufficient. EDIT Nothing vendor specific p...

HTML - Understanding href and the link and base tags.

I often get confused with the href attribute, the link tag, and the base tag. I'm unsure how to properly link the CSS file so a file can be moved into a subfolder and still work (example later on) so I went ahead and found out how the href works when specifying a location. For your knowledge, I'm working with my localhost, so I have the...

Move all files in subfolders to another folder using c#

My source path is "c:/Music/" in which i have hundreds of folders called Album-1, Album-2 etc. What i want to do is, create a folder called "Consolidated" in my source path. And i want to move all the files inside my albums to the folder "Consolidated". So that i get all the music files under one folder. How can i do this ? ...

Keeping Pages in its own folder?

I'm wondering if it would be okay to keep all of my pages in one folder on a site. and leave only the index.html page in public_html? I know the URL will be like example.com/pages/about.html but theirs a way to change that right? ...

C# WPF - Printing all files in directory that has ".xml" format - "could not find part of the path c#"

Hi, First of all - i googled the problem, and nothing good related seemed to come up. Also it will probably seem to you that this question is a newbie one (and i must say i never had this problem when printing files in a directory. I am pretty new to WPF in C#. so.. I am having problems to Print all files in directory that has ".xml" f...

Using "pathdir" on Java Applications

Hey guys, First, i'm using Ubuntu! :) I need some help here, I built a Java App, i want to set a default path tree, like this: > cd /anyDirectory/meuRestaurante > ls bin/ data/ > cd bin > ls meuRestaurante.jar > cd .. > cd data > ls Cartoes.txt Clientes.txt I want that my Java App save these txt's files on /data directory, while is o...

Deleting a Mac user account after logout

Hello, I am developing an image for a maclab, and I am running into an issue with Snow Leopard. We have set up the machines on active directory so network users can login, however after they logoff their user folders are still in there and I am not really sure how to go about auto deleting there information from the Mac machine. ...

Does anyone know of a service/db I can use for businesses and geocode?

I was wondering how and where companies like Foursquare/Gowalla find and keep up to date their list of location/businesses. Is it a web service? Do they buy a directory and enter it into a database? ...

A sane way to rename a directory in subversion working copy

While somehow versed in VCS (regular svn, git and git-svn user) I can't seem to wrap my head around this peculiar SVN behavior. Whenever I need to rename a directory in my SVN working copy from an otherwise 'clean' state - i.e svn status returns nothing and all other modifications have been commited - like so (which is what the svn doc ...

Get parent directory of file as string c++

I'm using Managed C++. I need to extract the parent directory after OpenFileDialog returns the String^ file path. System::String^ filestring = openFileDialog1->FileName; The method that microsoft uses is Directory::GetParent but this must be saved as System::IO::DirectoryInfo^ WhyIsThisNotAString = Directory::GetParent(files...

Loop through directories and search for .JPG filess

I have this code and I'm getting an IOException and can't figure out what the problem is. I'm trying to loop through the subdirectories in a directory and list all of the .JPG files. protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Session["AllEmpsLoadPath"] = "\\\\intranet.o...

Java Create Directory Runtime WebApp

Hi I have a webapp in Java SEAM2 running on JBOSS. In my application I am trying to create directories on the fly / runtime. Well what happens is that these directories get created, but when I try to write a file into them it throws a null pointer exception. So restarted my server and all works well then, why is it ? if(ClassName.cla...

cp -r from_dir/* to_dir with python

Is there an easy way to emulate the command cp -r from_dir/* to_dir with python? shutil.copytree is not suitable because to_dir exists. ...

How to create a backwards loop to find first matching file

What I'm looking for is a how to build a function that takes a child folder an loops through it and backwards in the directory hierarchy to find the first matching file that is specified. A example is that i lets say i have the directory structure: Home / Folder 1 / Folder 2 / Folder 3 And I'm looking for the file style.css. I would l...