I am trying to move some old folders (Modified folder date before 01/01/2021) to an archive folder on another Windows server. It must preserve the security parameters. I tried playing around with robocopy, but it would look at the files and move those. I am concerned with the root folders and modified dates.
Is this possible?
Related
Is there any way to filter folders by Name in Windows?
Let's suppose I have 100 or 200 folders with different names in the directory.
Now I have a list of specific folder names that are in the folders and I want to filter/move those listed name folders to another directory.
In an easy word I want to copy/move listed folder names to another folder/directory.
How can I do that with any software in bulk? I am searching for it but I can't find any software to do this task for me. I can manually move the folder one by one but it's so time-consuming when I have hundreds of folders.
I am currently using XCOPY GUI software but in this software, I have to first filter the path exception folder before I get my final result.
Example:
Main Dir contains
1st folder
2nd folder
3rd folder
4th folder
and so on ...
I have a list of names in my notepad which folders I want to copy or move.
3rd folder,
4th folder
Final Dir:
3rd folder
4th folder
How can I do that in bilk using any software or any way?
Thanks
If you're using Java, you can use methods in the Files class, or instances of File.
For example, Files.move() might help. If you're using an IDE, type stuff that might be right, like Files.move(), and suggestions will pop up that might lead you down the right path. Also, you can look at the documentation. I am currently scraping the web and creating and filing files, so I know about this somewhat, although not specifically about moving folders rather than files. I'm using Java on a MacBook, so that might influence how relevant my suggestions are to you depending on what you're using.
Basically, look at the documentation for your language. You hopefully won't need any external libraries since moving folders should be a basic task.
I'm facing a very complicated process of trying to move almost 100 files from 100 different folders with different folder names. Each folder has the file I want but they share the same file name across all 100 folders. The only thing that distinguishes them is the folder that they are in. I'm working in a terminal Linux command line system using bash so I'd need to code the transfer of these files. I could obviously do it individually but that would take ages.
The reason I want to transfer these files is I want to be able to run an analysis that involves pooling all these files into one folder from the 100 separate folders. However, if I move them they all have the same name which wouldn't work. Is there a way to rename things upon it being moved all in one go instead of individually moving things which would take ages? The key issue is since they all share the same name how do I tell which folder they originate from since that is their identifier.
In terms of what I have tried is I wanted to make a script that would iterate through the folders but the thing is I only need 100/1000 folders there. So I risk getting files from unwanted folders. Given the naming convetion of the folders are as follows
**GSE94671.T_CD5.Sp.ra (Keep)
GSE94671.T_CD5.Sp.rb (Keep)
GSE94671.T_CD5.Sp.rc (Keep)
GSE95337.ETP.Th.ra (Ignore)
GSE95853.HSPC.BM.rb (Keep)**
I couldn't come up with anyway to iteratre through them that avoids the specific folders I don't want.
Here's the scenario: We have a computer running Windows 10 which has a directory that's backed up nightly. The backups are done with a batch file utilizing Robocopy and scheduled via Windows. The parameters are as such that the backup will always add any new files or existing file edits into the destination, but it will never delete files from the destination that have been deleted in the source. It essentially archives all files which are in the source directory at the end of each day.
Here's the tricky part. The source directory is very large, and occasionally someone finds a duplicate file (or several duplicates of a file) in it. When that happens, we need to delete all but one copy of the file, and then we need to access the backup directory manually, locate the file there, and do the same. This is tedious and time-consuming as it's not rare for someone to notice an entire subdirectory full of files that exist 5+ times each.
What we're looking for is a way to scan the source directory and all subdirectories inside for duplicate files and remove all but one copy of them, and then a way to reflect that into the destination. I've assumed that we will not be able to use Robocopy to reflect the changes in the destination due to the nature of the backup script it's running, but we do have the ability to run any third-party software on the destination directory as well, essentially running an action in both directories to clean each of them of duplicate files.
On that note, I'm not against using third-party tools to make this cleaner or more efficient, I'm just not aware of any.
There is one way to solve this problem I was also suffering from this problem. but I found that how to use "BATCH" file
There are mainly 2 command
X_COPY
ROBO_COPY
According to your need here, (1)x_copy will be helpfull
xcopywill backup your specific file or folder even if you changed some megabytes data, it will copy the new data and will not be replaced on previous data it will make new copy.
HOW TO DO
Open NotePad and type
xcopy "source file" "destination" /y/e/d/c/f/h/i/z/j
And then save your notepad as ".bat" file
for more requirement use below url
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/xcopy
This is related to How to find a folder with Visual Studio project
I have a SSIS solution in Visual Studio 2012. It has a handful of projects under it, and each project has its own folder. But I renamed the projects within VS. I thought that would rename the directory folders too. It apparently did not. Under my main folder, I have a handful of solutions, and dozens of folders in this one directory.
How do I identify which folder belongs to which project?
Some folders need to be discarded before adding my code to git, and I do need the folder names to match the project names. So I guess I also need to know how to rename the folder (once I identify it), so it matches the project name.
Example - a solution structure:
Solution DIM_Inspect
Project Export_Inspect
Project Extract_InspectType1
Project Extract_InspectType2
Project Load_Inspect
Project Transform_Inspect
And my directory structure (along with a lot of other files and folders)
Dir DIM
Dir Export_InspectType
Dir Export_InspectType1
Dir Export_InspectType2
Dir Extract_InspectType1
Dir Extract_InspectType2
Dir Load_InspectType1
Dir Load_InspectType2
Dir Transform_Inspect
File DIM_Inspect.sln
I can identify the two extracts and the transform directory because they match. But one of those export directories should be called Export_Inspect. One of the load directories should be called Load_Inspect.
(In other words, there was a bit of renaming and figuring things out as I created the solution. Now, how do I figure it out and clean it up?)
Edit
I know all but the last folder for each project. I can look at the files within each folder, and I see my Export_InspectType1 folder has the following files (so it's probably the right folder)
Export_Inspect.dtproj
Export_Inspect.dtproj.user
Export_Inspect.dtsx
Export_Inspections1.database
Export_Inspections1.dtproj.user
Project.params
And the dates for the Export_Inspect.dproj.user indicate an active file (changed today). So I've found the folder (for one project). Is that the only way? And how do I change the folder name (and the .database file name) without messing everything up?
Is the only way to fix this to drop all the projects, fix the names, and then add the projects again? (Once I've manually inspected file name and dates in each subdirectory?)
There may not be an easy way from within VS. But there is a way.
First, do a rebuild all on the solution. The output will show each file and the directory it is in. If the directory and files have a mismatch, then those are the ones that will need to be fixed.
Find a mismatch, and remove the project from the solution.
Go to the file explorer and rename the folder. In my case, there were often some files in the folder that were kruft as well, and I put an x in front of the name (I'll remove all of those at the end).
Then, back in VS, add the existing project, browsing to the now correct folder name.
Do a rebuild all again, which will make sure no mistakes were made, and also allow checking that all folder and file names now match.
Looking to delete the folder - IF all files inside that folder are over a year old.
If even 1 file isn't, I need to leave the ENTIRE folder untouched. Very specific, I know.
I should add I have a good amount of folders to complete this on.