folders

Create function to create thambnails of available images in a folder

I have create a CMS to upload all image to a folder using ed all my images to a folder using, file.SaveAs(Server.MapPath("../images/") + advertID.ToString + "_" + i.ToString + fileExt) Now, all images are saved and i forgot it create thumbnails. :( I need to read all images at once and create thumbnails, myimg = System.Drawing.Imag...

How to group partial shared views for specified controllers?

Is it possible to tell ViewEngine to look for partial shared views in additional folders for specified controllers (while NOT for others)? I'm using WebFormViewEngine. This is how my PartialViewLocations looks at the moment. public class ViewEngine : WebFormViewEngine { public ViewEngine() { PartialV...

What is the best way to check if a website folder exists?

I need to check if a folder exists within an ASP.NET website. This is to be done within the website itself and I need to check a few folders so want to make sure there is little overhead (ie no WebCLient calls etc) My thinking is that I could do a HttpServerUtility.MapPath("~/") to get the root path and then a Directory.Exists(rootPath ...

Apache & PHP folder permissions

Hi, Our PHP scripts create dynamic folders and files and we are having a permission issue. The folders were initially create using our ftpuser. EG: Album (created by ftpuser) all subfolders and files in them have to be dynamically created. The apache user is the user when a new folder is created and then it cannot write anything to that...

Does anybody know output path Win Server 2008 for Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData

Hi, I need do some quick and dirty logging and I was asked to write to a file. I have done all the logging and now I need to save it somewhere on this Win Server 2008 Operating system. Does anybody know what the output is in Win Server 2008 for the following line of code. string myPath=Environment.GetFolderPath(Environment.SpecialFolde...

C# - Toggle hidden files system wide?

What would be the best way to be able to toggle hidden folder and files system wide? I would prefer to do it in C#. I know I would use the global keyboard hook but I am not sure how I would toggle folders/files to be hidden and then visible when the shortcut key is pressed. Any help is appreciated. Thanks. ...

Folder structure for a C project

Hey guys, which options do we have for the folder structure of a C project? I also would like to do TDD, so I need that that structure accommodates a test directory. What do you think? ...

Subdomains and Folders

Just started a site and I have an /img directory on the main domain. I would like to set up a subdomain(where the file folder is just another one in the main directory) that is able to use the /img folder but it doesn't work. The /img and /subdomain folders are on the same level, so to display images in the main domain I type: <img src...

Subdomains and Folders

Just started a site and I have an /img directory on the main domain. I would like to set up a subdomain(where the file folder is just another one in the main directory) that is able to use the /img folder, but it doesn't work. The /img and /subdomain folders are on the same level, so to display images in the main domain I type: <img src...

Python gzip folder structure when zipping single file.

I'm using Python's gzip module to gzip content for a single file, using code similar to the example in the docs: import gzip content = "Lots of content here" f = gzip.open('/home/joe/file.txt.gz', 'wb') f.write(content) f.close() If I open the gz file in 7-zip, I see a folder hierarchy matching the path I wrote the gz to and my conten...

Preventing access to files if a user types the full url on the address bar

Hi. i have a website, some folders on the websites contains images and files like .pdf , .doc and .docx . the user can easly just type the address in the url to get the file or display the photo http://site/folder1/img/pic1.jpg then boom.. he can see the image or just download the file my question is: how to prevent this kind of acti...

Deny access to a folder in ASP.NET

Hi guys, is it possible to prevent browsing of a folder contents in an ASP.NET web application other than creating a default page, say using web.config? I would like to avoid using IIS for this if possible. Thanks ...

Creating folders using DirectoryEntry

I am writing an ASP.NET (C#) application to create users for my domain. It also has to create folders and shares on a separate file server. I have so far been able to accomplish my task using System.IO.Directory.CreateDirectory to create the folders, a ("WinNT://fileserver/lanmanserver") DirectoryEntry to create the shares. Unfortu...

MFC Get Folders

Hey how do I in MFC get names of all folders? Any examples or which classes should I look into? Any hints will be really appreciated. All I saw is the CFile, which as far as I have seen (though very very little) doesn't looks like it has the ability to do what I want. So please direct me. Thanks ...

Replace Subversion Folder and Retain History

I have two development trees v3.3, and v3.4 in one SVN repository. They both contain a project called test-harness. However, the v3.4 developers have wrecked the test-harness so we need the test-harness from project in v3.3 to overwrite what we have in v3.4. I want to retain the history of change made to 3.4 test-harness as it has some i...

Where should I put configuration files in .NET?

In .NET, how should I get access to a folder for holding configuration data specific to the current machine or user (to avoid hard-coding a path)? (related:) http://stackoverflow.com/questions/1152065/which-is-the-best-location-to-keep-program-configuration-file-in-windows Question answered... by the way, here's typical WinXP output of...

Adobe AIR drag and drop directory

Hi, Please let me know how can I drag and drop a directory from windows onto Adobe AIR panel. The folder has subFolders inside. The subFolders have many files. I want to drag the parent folder and drop it so that the whole structure has to get uploaded. Please help. ...

os.walk and some tests

Hello guys. I'm not sure if i understand properly how os.walk store its results. Im trying to do the following: I'm checking a root folder for subsequent folders. There are several hundreds of em, and they are nested in somewaht uniform way. I'm trying to check each subfolder, and if it ends with a four digit number, store it in a lis...

Test if a directory is a sub directory of another folder

I am trying to create a function that will block access to some of my low level directories. For example, while building my site I don't want to allow uploads to be uploaded any lower than /var/www/html/site/uploads/ should I make a mistake while coding. This will also help to prevent a directory delete typo while removing cache files or...

jQuery:animate conundrum

I am having jQuery animation issues... I have a footer with a hidden div on top of it. When someone clicks a button near the header, the div should animate UP. Sort of like sliding up, like you're pulling a manila folder out of a drawer. (Not the normal slide up where the bottom of the div slides up to the top.) I found this piece of ...