subdirectory

htaccess - creating directories and files of the same name

老子叫甜甜 提交于 2019-12-13 07:28:27
问题 I want to create a bunch of files without an extension showing at the end. The easiest way to do that was to do this: /usa/index.php /usa/alaska/index.php /usa/alabama/index.php /usa/california/index.php What I want to do is this /usa/alaska.php /usa/alabama.php /usa/california.php and have it show up as: /usa/alaska /usa/alabama /usa/california However, I have one more level I want to add to this, the cities /usa/alaska/adak.php /usa/alaska/anchorage.php /usa/california/los-angles.php I don

view .m files in a folder (including subFolders) in MATLAB

浪尽此生 提交于 2019-12-13 07:17:10
问题 I have a Folder Factors inside Project folder. (all inside MyDocuments/Matlab). I need the list of all .m files in the folder FACTORS. Factors has subFolders and these subFolders hold all the .m files. Any suggestions? Directory Design -> Project... Factors ... etc subFol1 (has .m files) subFol2 (has .m files) ... 回答1: I have solved a similar problem.On Windows platforms, ,Like this: pathName='.... \FACTORS';%your path [stat path]=dos(['dir ' pathName '\*.m /s /B >path.txt'] ); name

How to run the powershell code against each subfolder that is in the IIS root directory?

吃可爱长大的小学妹 提交于 2019-12-13 06:41:14
问题 I would like to run the powershell code below, against each sub-folder that is in the IIS root directory. The output should be separate .htm file for each sub-folder contents (containing only the files in that sub-folder). If you need me to clarify my question, just ask. $basedir = 'c:\inetpub\wwwroot' $exp = [regex]::Escape($basedir) $server = 'http://172.16.246.76' function Create-HtmlList($fldr) { Get-ChildItem $fldr -Force | select ... ... } | Set-Content "$fldr.htm" } # list files in

Copy Directories with SSIS

旧时模样 提交于 2019-12-13 04:54:48
问题 I am using SSIS with Visual Studio 2012. I am using variables to make folders and folders within folders. The parent folder is static VarFolderPath = c:\Source\test\ the first subdirectory within it is dynamic based on yyyymm. I use the following expression to make this folder stores in the variable VarFolderName. @[User::VarFolderPath]+RIGHT("0" + (DT_STR, 4, 1252) DATEPART("yy" , GETDATE()), 4) + (DT_STR, 2, 1252) DATEPART("mm" , GETDATE()) Within VarFolderName I then make four other

htaccess remove subdirectory from url

为君一笑 提交于 2019-12-13 04:01:57
问题 I have read multiple threads based on this subject but none of the rules have worked so i'm sure i m doing something wrong. I have the following struncture in my /var/www main domain folders that redirects to domain.com folder1 that redirects to domain1.com folder2 that redirects to domain2.com Inside folder2 i have 3 more subdirectories folder2/subdirectory1 folder2/subdirectory2 folder2/subdirectory3 These should redirect to: www.domain2.com/subdirectory1 www.domain2.com/subdirectory2 www

Copy specific files from a directory and subdirectories into a target folder in mac

冷暖自知 提交于 2019-12-13 03:38:22
问题 I have a directory structure in which i have some specific files (say mp3 files) organised directly or in subdirectories(upto n levels). For example: Music Folder a.mp3 folder2 folder3 b.mp3 c.mp3 folder4 d.mp3 folder5 folder6 folder7 folder8 e.mp3 Now, what i require is to copy all files (.mp3 file) from all the folders and subfolders into another target folder. So my target folder would be like this: targetFolder a.mp3 b.mp3 c.mp3 d.mp3 e.mp3 I tried the answers from following questions:

Delete a current directory based on If condition

泄露秘密 提交于 2019-12-13 02:58:09
问题 Following code counts number of image in each sub directory. how to delete a sub directory if images in sub-directory are more than 2. n13 is main directory => which have 300 sub-directories(1...300) => each sub-directory have images . output: Images:2, Directory:1 Images:3, Directory:2 Images:4, Directory:3 import os path='C:/n13/' def count_em(path): x = 0 for root, dirs, files in os.walk(path): files_count = (len(files)) x = x + 1 print("Images:",files_count,"Directory:",x) return files

Print files and subdirectories of given directory

故事扮演 提交于 2019-12-13 02:25:51
问题 I am trying to get all files and directories from a given directory but I can't specify what is the type (file/ directory). Nothing is being printed. What I am doing wrong and how to solve it. Here is the code: sub DoSearch { my $currNode = shift; my $currentDir = opendir (my $dirHandler, $currNode->rootDirectory) or die $!; while (my $node = readdir($dirHandler)) { if ($node eq '.' or $node eq '..') { next; } print "File: " . $node . "\n" if -f $node; print "Directory " . $node . "\n" if -d

Direct link to a subfolder view returns 404

瘦欲@ 提交于 2019-12-12 19:25:11
问题 I cannot directly load a view that is in a subfolder in my CodeIgniter views folder with a direct link. Here is the folder structure: my_project/ application/ views/ pages/ about.php about/ organization.php history.php I need to access organization.php and history.php through a link such as: <div id="container"> <ul> <li> <a href='<?php echo base_url('about'); ?>'>About</a> </li> <li> <a href='<?php echo base_url('about/organization'); ?>'>About/Organization</a> </li> <li> <a href='<?php echo

Apply existing VBS folder search to sub folders?

旧时模样 提交于 2019-12-12 17:24:42
问题 I am using the following code to search a folder for a file name, open the file run an excel macro, save the file, and close. I would like to extend this to loop through sub folders and do the same. There should only be one layer of sub folders but multiple folders in that layer. dir = "C:\Users\ntunstall\Desktop\test" Sub RunMacroAndSaveAs(file, macro) Set wb = app.Workbooks.Open(file) app.Run wb2.Name & "!" & macro wb.SaveAs fso.BuildPath(file.ParentFolder, fso.GetBaseName(file) & ".xlsm"),