directory

Query Folder tree for Size and export to a log on a server

浪子不回头ぞ 提交于 2020-01-06 15:58:27
问题 Im looking to query the my documents folder for size, but also list the subfolders for size and export to a directory. I found some of this online and am trying to tweak to my needs but having issues with the export part, any help is GREATLY appreciated! : $startFolder = "C:\Users" $colItems = (Get-ChildItem $startFolder | Measure-Object -property length -sum) "$startFolder -- " + "{0:N2}" -f ($colItems.sum / 1MB) + " MB" add-content \\server\logs$\DirSize\log.log "$(gc env:computername)"

如何删除目录中的所有文件和文件夹?

二次信任 提交于 2020-01-06 14:24:40
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 使用C#,如何从目录中删除所有文件和文件夹,但仍保留根目录? #1楼 string directoryPath = "C:\Temp"; Directory.GetFiles(directoryPath).ToList().ForEach(File.Delete); Directory.GetDirectories(directoryPath).ToList().ForEach(Directory.Delete); #2楼 new System.IO.DirectoryInfo(@"C:\Temp").Delete(true); //Or System.IO.Directory.Delete(@"C:\Temp", true); #3楼 在Windows 7中,如果您刚刚使用Windows资源管理器手动创建它,则目录结构与此类似: C: \AAA \BBB \CCC \DDD 并且运行原始问题中建议的代码来清理目录C:\\ AAA,当尝试删除BBB时,行 di.Delete(true) 总是因IOException“目录不为空”而失败。 这可能是因为Windows资源管理器中存在某种延迟/缓存。 以下代码可靠地为我工作: static void Main(string[] args) {

Cannot permanently Change R Working Directory - Windows 10

余生长醉 提交于 2020-01-06 14:15:14
问题 I am running R 3.5.0 64 bit on my Windows 10 laptop. I can set the Working directory fine for my work space but I am unable to make a permanent change. Each time I reload it, it does not stick. I changed my Start In file path to the new directory under properties when right clicking the icon. I have also added setwd() with my file path in the Rprofile.site file No matter what I do, it continues to revert back to documents when I run getwd() in R when I open it new. Anyone have any ideas on

Set custom value when item moved to folder in outlook

这一生的挚爱 提交于 2020-01-06 13:53:27
问题 I'm looking to set a Date on a field anytime an email is moved into a specific folder. the field is custom called "Completed Date". Could I get a little help on VBA code to set a custom field (date) when an item is moved into a folder (folder name is "Completed"). I'm ultimately looking to report on the time an item (custom form email) was received to the time it was completed (as per the action of moving the email to a completed folder. Very rudimentary ticketing system, I'm very aware :) .

PHP directory problems

≡放荡痞女 提交于 2020-01-06 08:48:18
问题 I got a problem with this: I got file xxx.php in which I'm parsing one file: $config['etc'] = parse_ini_file('config/config.txt'); Everything is fine, until I'm including xxx.php file to my yyy.php file using require_once("lang.inc.php"); Then I get an message: Warning: parse_ini_file(config/config.txt): failed to open stream: No such file or directory in ... When I change ; $config['etc'] = parse_ini_file('config/config.txt'); to $config['etc'] = parse_ini_file('../config/config.txt'); then

Google Drive API Folder Creation and upload files by Service account in Google Drive Failed and generate 404 error after 1 day

↘锁芯ラ 提交于 2020-01-06 08:29:12
问题 Environment: PHP Working with folders and files: I created a folder and 4 sub folders within that folder in my google drive. Google DRIVE API Create a new console project and automatically enable the Drive API Service account: Create Service account and download the configuration file. Install the Google Client Library. composer require google/apiclient:^2.0 I shared these folder and 4 sub folders with service account. Expected Result: Folders and files should be create in sub Folders. Actual

How do I link to a file in a different directory without using the whole address?

橙三吉。 提交于 2020-01-06 08:13:24
问题 I'm building a website on my computer's local server, with the plan to upload to my webhost with all the links and relative pathways intact. However, I've run into a problem with how to link to pages and images in directories higher up the hierarchy chain. For example, let say my website is about food and all my logos and stylesheets are in the main .com directory. Then I add the subdirectory "fruit". Sure, I could keep all my Fruit images in the fruit directory, but how would I link back to

How can I get windows explorer to “browse to next folder”? (vbscript/batch etc…)

馋奶兔 提交于 2020-01-06 06:09:27
问题 I use the basic windows explorer to browse a large collection of images. I have a very well organised group of folders and I don't need/want any of the extra functionality of photo organisers such as picasa etc... The only drawback is: I'd really like to be able to browse from one folder straight into the next, without having to click back and choosing the next folder. So my question is, how could I do this in the smoothest way?! I'm guessing I could use a combination of some script and then

Android: How to get & set directory modification date

我是研究僧i 提交于 2020-01-06 04:29:24
问题 I'm looking for a way to get a directories modification date. I've tried: File dir = new File(myDir); long mod = dir.lastModified(); But it's returning 0. I'm also looking for a way to set the last modification date of a directory but haven't found anything. Is there a documented way to do these? 回答1: Edit: Your code looks right, Just check the existence of directory.. public long lastModified () Returns the time when this file was last modified, measured in milliseconds since January 1st,

Android: How to get & set directory modification date

岁酱吖の 提交于 2020-01-06 04:29:06
问题 I'm looking for a way to get a directories modification date. I've tried: File dir = new File(myDir); long mod = dir.lastModified(); But it's returning 0. I'm also looking for a way to set the last modification date of a directory but haven't found anything. Is there a documented way to do these? 回答1: Edit: Your code looks right, Just check the existence of directory.. public long lastModified () Returns the time when this file was last modified, measured in milliseconds since January 1st,