Move all subfolders (and their contents) that start with string [closed] - windows

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 days ago.
Improve this question
I have folders C:\Example\Project1, C:\Example\Project2, C:\Example\Project3, etc.
Inside some of those project folders are subfolders called OLD, so for example C:\Example\Project1\OLD
I'd like to move all those OLD subfolders to a new root folder C:\ExampleOLD so they would have a structure like C:\ExampleOLD\Project1\OLD, C:\ExampleOLD\Project2\OLD, etc.
How can I do this with robocopy or any other tool that comes with windows 10?

With Powershell... Please accept as answer. Best regards~
Get-ChildItem -Path "C:\Example" -Include "OLD" -Directory -Recurse -Force | Move-Item -Destination "C:\ExampleOLD" -Force

Related

PowerShell Windows script to rename selected files launched with a hotkey [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last year.
Improve this question
I'm trying to adapt this script that is called through a contextual menu:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\RenameWithTimestamp]
#="Rename: Add Date Modified"
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\RenameWithTimestamp\Command]
#="PowerShell.exe -WindowStyle Hidden -Command \"( Get-Item -LiteralPath '%1' ) | %%{ Rename-Item -LiteralPath $_.FullName -NewName ( '{0:yyyyMMdd_HHmmss} {1} {2}' -f $_.LastWriteTime,$_.BaseName, $_.Extension ) }\""
I would like to be able to execute this PowerShell script without right click contextual menu, only select the files and then launch the script that rename the selected files. Any idea?

Windows Attrib - How to made ALL files on a drive read/write - visible [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have a drive with some hidden, some readonly files.. how can I make ALL the files in ALL directories - visible and read/write using the attrib command or windows 10 comannds?
attrib /s /d -s -h -r d:\*.*
should accomplish that task. d:\ being the start directory.
The /d should process directories in addition to files.

How can I delete a "infinite" folder? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I was doing a program in Java and I've created, recursively, a folder that has a folder in, and so on.
I've tried to delete it but Window says it can't be deleted because is too big.
How can I delete it? Already tried rmdir /s /q and nothing.
Need Help.
\\?\ turns off file name checks.
rmdir /s /q "\\?\c:\somefolder\somefile.ext"
For explanation, see What does \?\ mean when prepended to a file path, which points to Naming Files, Paths, and Namespaces (MSDN).
You could boot from an Ubuntu Live CD/DVD and delete the folder. The command would be:
rm -rf myBigFolder

windows 7 copy files pointed to by shortcuts [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a bunch of shortcuts to files that are in various places on my hard drive. The physical files need to be backed up. Any ideas on how to script this?
Thanks,
Scott
$files = gci ~\Desktop\*.lnk | %{$sh = New-Object -COM WScript.Shell}{$sh.CreateShortcut($_.fullname).Targetpath}
The only thing I can think of is reading the type of file in the directory as it's being backed up. if it's a ".lnk" you know it's a shortcut. At that point use something similar to this article:
http://social.technet.microsoft.com/Forums/nl/winserverpowershell/thread/0293e186-2a21-4677-b1a5-f4e501570a98
To return the Target Path to a variable and then process that variable as if it were a file and copy the actual file.
I hope this makes sense. I have experience with PowerShell but not this exact situation. However, this is the approach I would take.

How to locate files/directories in Windows power shell [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am using a remote windows server and I have access to only windows power shell. I need to find path of few directories. Is there any way to locate files/directories in windows power shell.
Thank You
I got the solution, the command is
C:\> get-childitem -recurse -include *directory-name*

Resources