directory

PHP recursive directory menu

二次信任 提交于 2019-12-11 17:58:54
问题 I think similar questions have been asked before, but I can't quite wrap my head around whether what I want to do is logicaly possible. I currently use DDSmoothMenu on our intranet to list documents that we have for all staff to access. Menu structure would be something like: Documents -> Finance -> Forms -> File 1 -> File 2 -> File 3 -> Informational -> File 1 -> File 2 -> Insurance -> File 1 -> File 2 The basic structure of the menu is below: <ul> <li><a href='#'>Sub Menu Name</a> <ul> <li>

Get a folder path where is missing specified file into variable

点点圈 提交于 2019-12-11 17:58:12
问题 Let's say I have two folders in one . MyFolder\Folder1\ - contains .class and .java file MyFolder\Folder2\ - contains only .class file The question is, if you can make the batch file detect the folder in (MyFolder) where is a .java file missing and put the path into a variable. Something like: find sub/folder with no *.java files in MyFolder\ <-and somehow to put the folder path into a variable Does anyone know what would the script look like? Thanks to everybody that will help. 回答1: Here is

Makefile compile a library in another directory when it doesn't exist or the directory has been modify

烂漫一生 提交于 2019-12-11 17:46:53
问题 Hi i have a makefile that compiles my library and then compiles the program. What i want to do is that the makefile recompile alway i modify my library's files for that i thought in this ifneq ("$(wildcard $(PATH_LIB.A)","") FILE_EXIST = 1 else FILE_EXIST = 0 endif $(MAIN_PROCESS): $(PATH_LIB.A) check_lib ...thing to do... $(PATH_LIB.a): FILE_EXIST = 0 check_lib: ifeq("$(FILE_EXIST)","0") $(MAKE) -C $(PATH_MAKEFILE_LIB.A) endif My problem es that when i compile it relinks all time "...thins

Apache: .htaccess file is read from the top drive directory

橙三吉。 提交于 2019-12-11 17:40:01
问题 My DocumentRoot is e:/www - below my httpd.conf file part: DocumentRoot "e:/www" <Directory "e:/www"> Options FollowSymLinks Options +Indexes AllowOverride All Order Deny,Allow Deny from all Allow from 127.0.0.1 Allow from ::1 Allow from localhost </Directory> and I have 2 .htaccess files phisically located here: e:/www/.htaccess e:/.htaccess There is no additional Alias created in httpd.conf file. e:/.htaccess is read and its contents affect server perfomance. Why are the contents read at

Bash - change path to the folder with the highest version number

余生颓废 提交于 2019-12-11 17:27:19
问题 I have the below folder structure MyPackage └── versions └── MyPackage-1.0 └── src MyPackage-1.0.1 └── src MyPackage-2.0 └── src I am writing a bash script to build the latest version of the package and retrieve the build artifact. Part of that step is to change to the directory of the latest package: cd MyPackage/versions/MyPackage-2.0/src How can I write my bash script such that it will always choose the highest version subfolder (so in this case MyPackage-2.0 but in the future it could

Perl run the same script for different directories at the same time

南笙酒味 提交于 2019-12-11 17:22:27
问题 I have a directory that contains other directories (the number of directories is arbitrary), like this: Main_directory_samples/ subdirectory_sample_1/ subdirectory_sample_2/ subdirectory_sample_3/ subdirectory_sample_4/ I have a script that receives as input one directory each time and it takes 1h to run (for each directory). To run the script I have the following code: opendir DIR, $maindirectory or die "Can't open directory!!"; while(my $dir = readdir DIR){ if($dir ne '.' && $dir ne '..'){

Iterate though all files of a certain path in Excel VBA?

旧时模样 提交于 2019-12-11 16:54:19
问题 I am trying to iterate over a bunch of .xlsx files in a particular drive such that any file fits the following format: H:\[*FOLDER NAME*]\SpecificFolder\Finalized Plans\2019 Prefix[*].xlsx In other words inside folders on the H drive with subfolders \SpecificFolder\Finalized Plans\ containing .xlsx files starting with the literal phrase "2019 Prefix" . For example H:\Widget\SpecificFolder\Finalized Plans\2019 Prefix Howdyado Neighbor.xlsx or H:\Rofl672\SpecificFolder\Finalized Plans\2019

Trying to create multiple folders with VBScript

给你一囗甜甜゛ 提交于 2019-12-11 16:52:19
问题 I need to create A set of empty folders, starting at 10, going to 180. This is the script I'm trying to use, but it just creates 10, and nothing else. Option Explicit Dim objFSO, objFolder, strDirectory, i strDirectory = "\path\to\main\folder" Set objFSO = CreateObject("Scripting.FileSystemObject") i = 180 While i < 180 Set objFolder = objFSO.CreateFolder(strDirectory & i) i = i+1 WScript.Quit Wend I'm pretty new to VBScript, so maybe the problem is obvious, but I just don't see it. I also

How does one designate the root of a handheld device?

一曲冷凌霜 提交于 2019-12-11 16:39:07
问题 I need to recursively search a handheld device for any files anywhere on the device that follow a certain pattern (such as " Platypus .XML"). To pass the root of the device to my directory traversal method, do I pass "\" or something else? In Windows Explorer, the device is "J:\" - but I know that can't work, because it won't be mapped to J for everyone. The device's full name in Windows Explorer is something like: Duckbill (\\LEXINGTON\dev\Xmen\Miguel\Installs) (J:) ...but similarly, each

More of paths and such

与世无争的帅哥 提交于 2019-12-11 16:26:54
问题 I am making a script that finds what the 2nd folder in the path is, how would I do this? dirA dirB/C ---- I need dirB indirB - dirD/E indirE - The file I need to find the name of the folder in the 2nd level that paths to the file (I marked it with stars). how would I go about finding this 回答1: How about this extension: public static class StringExtensions { public static String PathLevel(this String path, int level) { if (path == null) throw new ArgumentException("Path must not be null",