subdirectory

Iterate through Registry Subfolders

巧了我就是萌 提交于 2019-12-12 11:14:19
问题 I want to get all values of a registry path include the values of its subfolders. Right now i read the values of a single folder by this: const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ strComputer & "\root\default:StdRegProv") strKeyPath = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys For Each subkey In arrSubKeys msgbox subkey ' Just

How to search subdirectories for .c files and compile them (shell scripting)

不羁岁月 提交于 2019-12-12 06:48:30
问题 I need to take an argument which is a directory of the current directory and search its folders and compile any C files in those folders. I'm just beginning shell scripting in Bash and am a little over my head. So far things I've tried included using find to search for the files and then pipe it to xargs to compile but kept getting an error saying that testing.c wasn't a directory. find ~/directory -name *.c | xargs gcc -o testing testing.c I've also tried ls -R to search folders for .c files

Compress separately files within subfolders

穿精又带淫゛_ 提交于 2019-12-12 03:33:51
问题 Hi all and thanks for the answers, Firstly, I tried to find the answer to my problem but I did not find anything. I have a tree of folders and sub-folders and I want to use 7zip to compress the files within those folders separately. I have got this piece of code from this very website, it does what I want to get but it places the compressed files on the main folder: set extension=.* for /R %%a in (*%extension%) do "%sevenzip%" a -mx "%%~na.zip" "%%a" I wonder if I can get a zip file of every

Jump into each subfolder and back again with bash

你说的曾经没有我的故事 提交于 2019-12-12 03:26:02
问题 I'm trying to write a bash script that is jumping into each subfolder and then jumps back to main folder (and so on...). The difficulty are the path names that have spaces. for path in "`find -type d | tr -d './'`" do echo "Next Pathname: $path" cd $path echo "I'm in path $pathr" cd .. done The Error Message is "filename or path not found". When I change cd $path to "cd $path" then I get the error message "filename too long". Could you help me? - I don't know how to separate this string (or

Generate object files in subdirectory using a Makefile

时光总嘲笑我的痴心妄想 提交于 2019-12-12 03:16:26
问题 I am trying to create a Makefile in order to generate object files in a subdirectory rather than let them in the src/ folder. Here is the structure of the project: Trunk - Server - src/ - include/ - Common - src/ - include/ The Makefile is located in Trunk/Server . Source files are located both in Server/src and Common/src , so the Makefile currently has something like this: SRC = src/main.cpp \ src/Network.cpp \ ../Common/src/SQLManager.cpp \ ../Common/src/Utils.cpp I woud like to put

In Perl how to use recursion to search directories and sub directories and specify the depth?

徘徊边缘 提交于 2019-12-11 19:34:41
问题 So I know you can in the subroutine, open the directory using opendir, then use readdir to to read all the files in the current working directory, then push all the files into an array. Go through the array if it is a file then print the file or push that file into a new array else if it is a directory recursively call the subroutine again. What I don't understand is where in here would I specify the depth. Any help is greatly appreciated. The following is the solution I arrived at with your

Create a file and its parents directories in c

时光总嘲笑我的痴心妄想 提交于 2019-12-11 16:42:03
问题 I didn't find any relevant answer for this question. I want to create a file and its parent directory at the same time: example: FILE *fd2 = fopen("test/test", "w+"); where test/ doesn't exist. Is there a way to do this? 回答1: In Linux you can do it with the following code #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> ... /* check if directory exist */ struct stat status = { 0 }; if( stat("test", &status) == -1 ) { /* create it */ mkdir( "test", 0700 ); } /* open file */

Typo3 : using typoscript to modify the base-url

梦想的初衷 提交于 2019-12-11 16:07:18
问题 I am trying out TYPO3's introduction package. For that I am using Xampp on my computer. I have installed it in a subdirectory, but since it uses "real-url", I need to modify the generated links, so that instead of http://localhost/about-typo3/ I get http://localhost/subfolder/about-typo3/ I believe it must be done via "typo-script", and from what I have read on the Internet, this line should do the job : config.baseURL = http://localhost/subfolder/ But I don't know where I should put it. I

add submodule (built with cmake) in qbs project

不打扰是莪最后的温柔 提交于 2019-12-11 15:39:05
问题 I'm using cmake to build my project now and I want to migrate to qbs in the future. I have some opensource sub-modules from github, which are currently built with cmake , and are included in my project using cmake 's add_subdirectory . I've tried to research but found no alternatives of add_subdirectory in qbs. I don't think migrating all sub-modules build system from cmake to qbs is a good idea because that means I have to migrate sub of sub-modules or sub of sub of sub-modules as well :)

Extracting Attachments from *.msg files stored in many subfolders

余生长醉 提交于 2019-12-11 15:25:55
问题 The below code extracts attachments from *.msg files stored in one folder. I'm seeking to extract attachments from *.msg files stored in many subfolders within a folder. The path for the main Folder is: U:\XXXXX\XXXXX\Main Folder The paths for the subfolders are: U:\XXXXX\XXXXX\Main Folder\Folder1 U:\XXXXX\XXXXX\Main Folder\Folder2 U:\XXXXX\XXXXX\Main Folder\Folder3 etc. Sub SaveOlAttachments() Dim msg As Outlook.MailItem Dim att As Outlook.Attachment Dim strFilePath As String Dim strAttPath