directory

ffmpeg output to dynamically created folders

做~自己de王妃 提交于 2019-12-25 18:37:05
问题 My main aim is from the below code: @Echo off for %%i in (*.mp4) do ( ffmpeg -i "%%i" -vf fps=1/1800 "%%~ni_%%d.jpeg" ) I want to be able to use the file name to create a new folder with said file name and store the images that will be screentshot in the folder. So basically have a separate folder created for each video file and it automatically naming the folder the same name as the file 回答1: Is this what you want? @echo off for %%i in (*.mp4) do (if not exist "%%~ni\" MD "%%~ni" ffmpeg -i "

VBA to move read emails to specific folders

柔情痞子 提交于 2019-12-25 18:36:52
问题 I'm struggling to find a definitive answer to what must be a reasonably common problem? My boss has folders in their inbox for members of the team, but doesn't want to move the emails there until they have been read out of the inbox. So I am trying to write a macro which follows these logical steps: For each mailitem in inbox: Check if read Check sender name select case True sender name like existing folder name move item to corresponding folder name next mailitem Can you help me put this

How do I search for the directory of a file given its name using a batch script?

一笑奈何 提交于 2019-12-25 18:28:55
问题 I know the name of a file, but I don't know what directory it resides in. I need to find the directory. Given the name of a file, how can I search for a directory that contains this file with a batch script? 回答1: I am assuming you know which drive it is located on, let us say drive C: If you just want to list all the locations where MYFILE.TXT exists, then dir /b /a-d /s "c:\myfile.txt" The above will include the file name in the output. If you need to do something with the path, let us say

picture does not show up using iCarousel

和自甴很熟 提交于 2019-12-25 17:56:07
问题 I am using MultiCarousel in a storyboard and I am getting errors and can not display the image in the carousel. Is there a problem with the code??I am getting errors from viewfromItemAtIndex saying expected method body expected':' expected identifier or ( expected identifier or ( extraneous closing brace ("}") Please feel free to ask for more code if you want to see a specific part. #import "iCarouselExampleViewController.h" @interface iCarouselExampleViewController () @property (nonatomic,

C/Unix: How to extract the bits from st_mode?

蓝咒 提交于 2019-12-25 17:03:43
问题 I am a beginner to Unix programming and C and I have two questions regarding the struct stat and its field st_mode : When accessing the st_mode field as below, what type of number is returned( octal, decimal, etc.) ? struct stat file; stat( someFilePath, &file); printf("%d", file.st_mode ); I thought the number is in octal but when I ran this code, and I got the value 33188 . What is the base ? I found out that the st_mode encodes a 16 bit binary number that represents the file type and file

C/Unix: How to extract the bits from st_mode?

允我心安 提交于 2019-12-25 17:03:22
问题 I am a beginner to Unix programming and C and I have two questions regarding the struct stat and its field st_mode : When accessing the st_mode field as below, what type of number is returned( octal, decimal, etc.) ? struct stat file; stat( someFilePath, &file); printf("%d", file.st_mode ); I thought the number is in octal but when I ran this code, and I got the value 33188 . What is the base ? I found out that the st_mode encodes a 16 bit binary number that represents the file type and file

PHP unlink denied on localhost / windows

喜夏-厌秋 提交于 2019-12-25 16:44:52
问题 In portuguese language we use an expression to tell what's going on which is: this is witchcraft So, I'm trying to unlink an image, and while I'm writing this topic I'm thinking about the possibility of <img src='url'/> means that the image is open (?). I have an html table with two columns. # | Image Delete Image here displayed Delete Image here displayed etc.. etc... By clicking "Delete", an AJAX function is performed. $(".delete").on('click', function(){ var parent = $(this).parent(); $

glob() to build array of files, or hardcode array? Speed is key, but automation is nice

送分小仙女□ 提交于 2019-12-25 14:23:31
问题 Sorry for the undescriptive title, wasn't to sure what to title this :-) I have written an API that loads required javascript libraries from a directory on my server. The directories have a specific format, the only thing that can differ is the file name format within each libraries' directory. The Directory Format _js/_source/_library_name_here/file_name_here.js e.g. /_js/_source/_fancybox/jQuery.lightbox-0.5.js The array (currently hardcoded) At the moment I have the separate libraries

glob() to build array of files, or hardcode array? Speed is key, but automation is nice

允我心安 提交于 2019-12-25 14:23:13
问题 Sorry for the undescriptive title, wasn't to sure what to title this :-) I have written an API that loads required javascript libraries from a directory on my server. The directories have a specific format, the only thing that can differ is the file name format within each libraries' directory. The Directory Format _js/_source/_library_name_here/file_name_here.js e.g. /_js/_source/_fancybox/jQuery.lightbox-0.5.js The array (currently hardcoded) At the moment I have the separate libraries

How do I get the path of a random folder?

痴心易碎 提交于 2019-12-25 14:09:22
问题 Like start at c:\ (or whatever the main drive is) and then randomly take routes? Not even sure how to do that. public sealed static class FolderHelper { public static string GetRandomFolder() { // do work } } 回答1: Try getting a list of all the folders in the directory, then generate a random number up to the number of folders, then choose the folder that relates to your random number. System.IO.DirectoryInfo[] subDirs; System.IO.DirectoryInfo root; // assign the value of your root here