PowerShell to delete current users folder and files - directory

Want to delete any files of folders name beginning with word "Leap" in file location localdata\Microsoft_Corporation\

Related

Zsh - How to source for the same name file inside subdirectories and exclude specific directories?

for file in $LIB_DIR/*/config; do
source $file
done
I have to look up all the subdirectories that contain the config file, but I want to exclude two specific directories from being read the same name config file.

UNIX: how to zip a folder that contains more folders w/o including any of the folder paths

I' m trying to zip a folder that contains some .json files plus subfolders with more .json files. I need to zip the parent folder with everything included without containing any of the parent or subfolders paths. Is there any way I can do this?
Thank you
EDIT:
I want this:
pending_provider/722c9cb2-268b-4e4a-9000-f7f65e586011-version/1d296136-ac87-424e-89c4-682a63c7b853.json (deflated 68%)
But not this:
pending_provider/722c9cb2-268b-4e4a-9000-f7f65e586011-version/ (stored 0%)
I want to avoid the "stor" compression type which only saves the folder path. I want only the "defN"
So the -j doesn't help me a lot
Thanks
If you don't want any paths at all you could use the -j option. Below is the man page entry for the option.
-j
--junk-paths
Store just the name of a saved file (junk the path), and do not store
directory names. By default, zip will store the full path (relative to
the current directory).
If you just want to exclude directories
-D
--no-dir-entries
Do not create entries in the zip archive for directories.

Copying and pasting specific files from one existing directory to another existing directory

Hi I am new to R and been trying to create a script that copies a few specific files from one location to another location. Both directories already exist.
#identify the folders
current.folder <-'S:\xx'
new.folder <-'S:\yy'
filestocopy<-c("a.xlsx",'b.xlsx','c.xlsm')
#copy the files
file.copy(filestocopy,new.folder)

Get folders with files from ftp with spaces in their names

I am trying to get files from an ftp location. The files are present inside folders in the ftp location and the folder. My folder names contain spaces. For example My folder structure is as below in ftp location:
MYFOLDER/Inner folders/inner files***.pdf
MYFOLDER/Second Inner folders/inner files***.pdf
My aim is to get all the folders with their files to my local.
I tried mget -r * but unable to get the files and got the error "Failed to open file.". Can anyone help me with this.

How to stop git (.gitignore) from tracking minqueue (wordpress plugin) cached changes

After entering "git status", I keep getting messages like wp-content/uploads/minqueue-cache/minqueue-9cbb4cb4-9cb6af13.js
even though I have added the following line to .gitignore file: /wp-content/uploads/minqueue-cache/*
. Why is this?
The slash in the beginning of /wp-content/uploads/minqueue-cache/* means starting from the directory where the .gitignore file is in, so your pattern will match all files and folders inside wp-content/uploads/minqueue-cache/ but not the files inside www.apis.de/wp-content/uploads/minqueue-cache/.
If you change the pattern to wp-content/uploads/minqueue-cache/* it will match all files and folders in all wp-content/uploads/minqueue-cache/ folders, no matter where they start.
If you change the pattern to /www.apis.de/wp-content/uploads/minqueue-cache/* it will match all files and folders exactly in this one directory.

Resources