directory

NSIS - How to include all folders from source to Installer

為{幸葍}努か 提交于 2019-12-20 09:45:20
问题 I have an application which consists one .exe , many .dlls and a few folders. I use NSIS to create an installer. It works but when I install the software, I don't see all the folders inside my application. What do I have to do to bundle all the folders within my application into the installer? This is the code I set the data source at this time: File "c:\MyProject\MyApp\*" 回答1: The documentation tells us that the /r argument of the File command includes all sub folders and files. So you would

NSDocument to hold a complete folder?

给你一囗甜甜゛ 提交于 2019-12-20 09:44:47
问题 I ask sorry if this argument has already been covered, but after some research i found nothing precise. I need to make a document based application, where the document is actually not a single file but a structured collection of files, in a directory. The windows will show a pdf contained in the folder, with a specific filename, and enrich it with informations from the other files in the folder. I cannot use pdf annotations to achieve this, i really need to keep the files separated from the

Java - how do I write a file to a specified directory

时光总嘲笑我的痴心妄想 提交于 2019-12-20 09:12:09
问题 I want to write a file results.txt to a specific directory on my machine (Z:\results to be precise). How do I go about specifying the directory to BufferedWriter/FileWriter? Currently, it writes the file successfully but to the directory where my source code is located. Thanks public void writefile(){ try{ Writer output = null; File file = new File("results.txt"); output = new BufferedWriter(new FileWriter(file)); for(int i=0; i<100; i++){ //CODE TO FETCH RESULTS AND WRITE FILE } output.close

Linux: Set permission only to directories

不打扰是莪最后的温柔 提交于 2019-12-20 09:01:05
问题 I have to change the permissions of the htdocs directory in apache to a certain group and with certain read/write/execute. The directories need to have 775 permissions and the files need to have 664. If I do a recursive 664 to the htdocs , then all files and directories will change to 664. I don't want to change the directories manually. Is there any way to change only files or directories? 回答1: Use find's -type option to limit actions to files and directories. Use the -o option to specify

Change directory in Node.js command prompt

社会主义新天地 提交于 2019-12-20 08:56:50
问题 I want to move to another directory in Node.js command prompt but when I open the Node.js cmd window it doesn't show me any path. Here is the screenshot of the Node.js cmd window: Now if i want to change directory to D:\abc then how can i do it here? 回答1: That isn't the Node.js command prompt window. That is a language shell to run JavaScript commands, also known as a REPL. In Windows, there should be a Node.js command prompt in your Start menu or start screen: Which will open a command

Copy nested folders contents to one folder recursively (terminal)

风流意气都作罢 提交于 2019-12-20 08:41:36
问题 I have a Wordpress upload folder that is structured using subfolders for months. wolfr2:uploads wolfr$ tree . . |-- 2007 | |-- 08 | | |-- beautifulkatamari.jpg | | |-- beautifulkatamari.thumbnail.jpg | | |-- beetle.jpg | | |-- beetle.thumbnail.jpg How do I use terminal to copy all the images recursively into another folder? I can't seem to wildcard folders like you can wildcard filenames. (e.g. *.jpg or *) (I'm on Mac OSX) cp -R ./*.jpg . ? 回答1: This will copy all *.jpg files from the current

Surround all lines in a text file with quotes ('something')

旧巷老猫 提交于 2019-12-20 08:36:11
问题 I've got a list of directories that contain spaces. I need to surround them with ' ' to ensure that my batch scripts will work. How can one surround each new line with a ' and a ' (quotes). e.g. File1: /home/user/some type of file with spaces /home/user/another type of file with spaces To File2: '/home/user/some type of file with spaces' '/home/user/another type of file with spaces' 回答1: Use sed? sed -e "s/\(.*\)/'\1'/" Or, as commented below, if the directories might contain apostrophes

如何方便快速在指定文件夹打开命令行

情到浓时终转凉″ 提交于 2019-12-20 08:30:43
很多时候我们需要打开命令行然后进入到相应目录进行一些操作。 常规的做法是: Win+R打开运行窗口 输入"cmd"回车打开命令行窗口 假如我们要进入的是D盘foo文件夹下的一个bar子文件夹,路径是这样的D:\foo\bar,首先输入" D:"回车进入D盘 再依次输入"cd foo"," cd bar"; 或者在资源管理器的地址栏里复制文件夹地址"D:\foo\bar", 然后输入cd 再把复制的地址一次性粘贴到cd 后面(适用于文件夹路径较长时,避免一个一个地输入) 如果需要进行频繁命令行操作,每次都要通过这样的方式来进行,势必很麻烦。 按住Shift键右击鼠标打开命令行窗口 其实Windows有个不显眼的功能是这样的,同样还是以定位到D盘foo文件夹下的一个bar子文件夹为例,在bar文件夹里,将鼠标置于空白处,按住Shift键不放,同时右击鼠标,这时在出来的右键菜单里会出现一个"打开命令行" 的菜单选项。 此刻打开后的命令行窗口的路径已经定位到了刚才的目录,即从哪里打开的,命令行的执行路径则被自动定位到了哪里。 以管理员身份在当前目录打开命令行窗口 上面的方法虽然比原始的方法方便了许多,但有些时候我们在命令行里的操作需要管理员身份,这时就要求命令行窗口是以管理员身份打开的,而上面的方法打开的是普通的命令行窗口,在此时就无法满足要求了。 同样地

JBoss目录结构说明

社会主义新天地 提交于 2019-12-20 08:30:22
jboss-as 目录结构(Directory Structure) Directory Description bin Contains startup, shutdown and other system-specific scripts. Basically all the entry point JARs and start scripts included with the JBoss distribution are located in the bin directory. 包含了服务器启动,关闭和系统相关的脚本。基本上所有jar文件的进入点和启动脚本都在这个目录里面。 client Stores configuration files and JAR files that may be used by a Java client application (running outside JBoss) or an external web container. You can select archives as required or use jbossall-client.jar . 保存Java客户端应用或外部web容器(在JBoss之外运行),所需的配置文件和Jar文件。 docs Contains the XML DTDs used in JBoss for

Xcode: directory file for simulator Iphone

和自甴很熟 提交于 2019-12-20 08:29:09
问题 i want to write a string in a file "file.txt": this file in my project (for Iphone) is inside Resources; I try to write a string in this file but it don't work, I show my code. NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"file.txt"]; NSError *error; [outputString writeToFile:filePath atomically:YES encoding