我在目录中有大量文件.我试过跟随makecab,但它不包括文件夹中的所有文件到cab文件中.
makecab /d "C:\Users\crtorres\Documents\- SouthPacific Project 2014\- Projects\Sales Doc Center\New Region" test.cab
Run Code Online (Sandbox Code Playgroud)
以下工作但cab文件只有清单文件.makecab manifest.xml test.cab
在第一个空格后获取字符串中所有单词的语法是什么?例如,鲍勃漂亮的房子.所以结果应该是没有引用的"好房子".
([^\s]+) 给了我所有3个单独的单词;
,[\s\S]*$ > 没有编译.
我想知道是否有一个可以将c#代码转换为powershell cmdlet代码的在线工具.我有以下代码,我需要它有PowerShell.我没有visual studio把它变成exe或dll.任何帮助或想法都会很棒.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
namespace CopyUsersBetweenGroupsInSharepointByRR
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("This tool will copy the users from one group to another group");
Console.WriteLine("Please enter the URL of the site where your groups are available");
String siteUrl = Console.ReadLine();
using (SPSite site = new SPSite(siteUrl))
{
try
{
SPWeb web = site.OpenWeb();
Console.WriteLine("Please enter the name of the source group");
String sourceGroupName = Console.ReadLine();
Console.WriteLine("Please enter the …Run Code Online (Sandbox Code Playgroud) 我的事务日志文件可以追溯到6个月.我需要从数据库中回滚2013年5月20日之后发生的所有事情.任何人都可以请教我如何做到这一点?
我有这个公式.这很好用,但是当包含点在内的5个字符时会失败.
例如,
abcdefgh.pdf = TRIM(左(A1,LEN(A1)-4))给我abcdefgh xyz.xlsx = TRIM(左(A2,LEN(A2)-4))给我xyz.
是否有一个公式可以查找最后一个点并修剪最后一个点后的所有内容?
我正在运行以下ps脚本以获取一些数据到csv.person字段(AssignedTo和CreatedBy)带有索引; #LastName,FirstName.如何在没有索引的情况下获取名称.或者我需要进行正则表达式还是替换?例如,
32;#Doe,John应该是Doe,John
$results = @()
$web = Get-SPWeb "http://ourlocal.company.cc/docs/sales"
$list = $web.Lists["Sales Tasks"]
$caml = '<Where><Eq><FieldRef Name="Status" /><Value Type="Choice">Completed</Value></Eq></Where>'
$query=new-object Microsoft.SharePoint.SPQuery
$query.Query=$caml
$ListItems=$list.GetItems($query)
Write-Host "count " $ListItems.Count
foreach ($item in $listItems)
{
$Title = $item["Title"]
$AssignedTo = $item["AssignedTo"]
$Status = $item["Status"]
$Priority = $item["Priority"]
$CreatedBy = $item["Created By"]
$out = new-object psobject -Property @{Title = $Title
AssignedTo = $AssignedTo
Status = $Status
Priority = $Priority
"Due Date" = $DueDate
"Percent Complete" = $Percent
"Created by" = $CreatedBy}
$out = …Run Code Online (Sandbox Code Playgroud) 我正在尝试为具有深层文件夹结构的文件共享创建CSV文件.
我希望CSV看起来像:
filename, filepath, file type, folderStructure
Run Code Online (Sandbox Code Playgroud)
到目前为止,我有以下内容:
#Get-ChildItem -Path D:\ -Recurse
$directory="d:\"
gci $directory -recurse |
where {$_.psiscontainer} |
foreach {
get-childitem $_.fullname |
sort creationtime |
select -expand fullname -last 1
}
Run Code Online (Sandbox Code Playgroud) powershell ×3
c# ×2
sharepoint ×2
batch-file ×1
cab ×1
cmdlets ×1
directory ×1
enumerate ×1
excel ×1
makecab ×1
regex ×1
rollback ×1
string ×1
trim ×1