Automatic sorting of new folders Windows - windows

I know about setting sorting for parent folders and stuff.
But when creating a new folder in Windows, sorting is by name. Is it possible to change some value in the registry or create some script for the action of creating a folder - so that sorting by date is automatically set.
That is, I would like it to be without any additional actions, well, there must be system settings somewhere in Windows? Even setting for all folders in the system of such a value will do.
Thanks.

1.Open file explorer
2.Open any folder, then select View from the top menu
3.Click on Date modified to sort by most recent
4.Select Options from the far right top menu then choose Change folder and search options
5.Select View tab, Apply to all folders
6.Create a test folder and refresh to see if it gets sorted by date
You can also refer to this answer
https://superuser.com/questions/49591/how-do-i-change-the-default-sort-order-on-windows-explorer-and-the-file-dialogs

Related

Xcode 5.0.1: How to make folders appear on top of files in the Project Navigator

I've just started using Xcode and discovered that folders are mixed with files of the same level alphabetically.
Is there a way to have folders displaying on top and then files of the same parent folder? Just like in TextMate's FileBrowser.
Current displaying is:
I want it to be:
Thanks in advance.
Changing the MacOS Finder preferences will cause XCode to also display folders before files at the same level.
Find and check the checkbox under Finder -> Preferences -> Advanced labelled Keep folders on top: In windows when sorting by name.
Restart XCode and you will find the new sort order is honored.
Just mouse-down on an item and move it. The file or folder level can also be changed this way. You can make folders from the menubar :File:New:Group".
I see that you are using folder references, not groups. If there is no specific reason to use folder references then change to use groups. When dragging in a folder of files there is the option of folder references or groups. Since folder references are a mirror of the directory structure and can not be changed in Xcode. I suspect the OP really wants groups.
When you are at the very bottom you can drag horizontally to select the level to move to. See added image.

Standard way to rename xcode project

After I create a project name for example Proj11, I'd like to change the name to Proj12.
So I use Project->Rename, then the name of the project to Proj12
But the project still contains several folders name Prlj11, and after I change the folders' name, the project can't been loaded.
So what is the standard way to rename my project as well as folder name.
Click on the project folder (blue folder with your app name on the top of the project navigator). Pull up the utilities (right pane), then file inspector. Your project name is there, change it to whatever you want. Then it will ask to save, keep all the files it selected for you selected, then press rename
The best answer I found was on the apple developer site. Imagine that? You can follow the link below, but essentially it is:
1) click on the target in xcode, on the right in "Identify and Type" under name change the name and press the ENTER button on your keyboard.
2)a window will appear confirming the change and what it will change. Once you confirm it will make the changes.
https://developer.apple.com/library/ios/qa/qa1625/_index.html
OR ANOTHER WAY AND EVEN EASIER:
left-click on the name project and rename. As soon as you rename it will ask you if you want to rename:
The folders you see in XCode navigators are not an actual folder/directories, these are virtual folders only to group your files.
And the folders you see in Finder, the path you manually set for the project, you need to rename them manually.

xcode 4.x.x Project Navigator - use real folders

Is there a way to make xcode use real folder hierarchies in the Project Navigator?
I'm finding these pseudo folders somewhat annoying because they do not reflect the project on disk.
Or at least have the xcode-made-folders a different color than the real folders?
Thanks.
Not really, although they are colored differently.
You have groups (yellow) -- which can refer to a directory, but does not update automatically to reflect what's on disk. Groups can also represent a group which has no relation to a directory or the structure of its contents.
You also have a reference (blue). This updates automatically, but its contents are not first class project items.
Personally, I just structure projects such that they can be (re)constructed from an on-disk representation easily (e.g. drop the folder), or in another IDE. Quite often, details which could (unnecessarily) be defined in Xcode are moved outside of the xcodeproject. Synchronizing the representation in the Project Navigator is about as easy as drag and drop once you work out how to structure the program/sources/targets.
Edit: I am referring to the Project Navigator. Whether what you refer to as the "project organizer" means the Project Navigator or some part of the Organizer, I am not sure.
Making a folder structure mimic your Project Navigator group structure:
For this procedure, as always, make a backup of your whole project folder before doing this (a zipped Archive in Finder does nicely).
What you want is easy to set up for new files added to or created by the project, but it can be a mess if you already have a lot of files in the groups you want, but not in the disk folders you want.
If you hilite a group in Project Navigator, move your attention over to Utilities pane > File Inspector > Identity. The key area is dealing with Paths. The popup will give you various relative paths to the default location of the group's files, and Full Path will always give you just that. In a fresh project you'll find that any groups created all have the same location assigned.
Now the key here is the little window icon button just under the popup (to the very right). If you click that you can choose a (folder) location for files in that group. If you already have files in that group they will not be moved to the new location, but will instead turn red in Project Navigator because the files on disk are not in the newly assigned path for the group, but moving them into the folder you just set up for the group should fix you back up.
(Tip: The little arrow button is a shortcut to "Reveal in Finder")
Now, when you make a "New File...", after selecting what type of file you want (Next), then configure whatever setting apply for that type (Next), you're presented with a sheet asking where to place the new file(s). If you have that group selected in Project Navigator before you begin this process, it will already be selected as the item in the "Group" popup at the bottom of the sheet, and the folder associated with that group will be selected in the file browser. If you decide you want it in a different group (I do that all the time because I won't have the proper group selected in Project Navigator before I get to this point), just change it in the Group popup at the bottom and the file browser will change to the folder associated for the group you just selected.
If you later make a sub-group of a group in Project Navigator, it will default to the path of the parent group. If a sub-group already exists when you set the path of the parent group, the paths for any existing sub-groups will not move with the parent.
Avoid duplicate files: If you want to move existing files into another group (that already has a path assigned to it) and also move the files into the group's folder on disk, you have a choice at this point. You can go ahead and delete them from Project Navigator, making sure you only delete the reference to them and move on to the next step, or as an option, you can actually move them in Project Navigator to the group you want them in (this doesn't change disk location of the files -- the folder associated with the group only applies to new files for the group) and use them as a guide for what still needs to be dragged in from the Finder. This can come in handy if you are going to be moving a lot of existing files around, as you'll see in a moment.
Now, in Finder, manually move some files into the folder that they should end up in (the folder associated with the new group). If you moved them over in Project Navigator (instead of removing them), they will turn red because the actual files are not at the place they were, but this can be a guide (especially if you're moving a lot of files around) for what still needs to be set properly.
Now, you can drag and drop them from Finder onto the group that's associated with the folder where you put the files. In the dialog that comes up, it doesn't matter if the checkbox is checked or not for copy (if necessary), since they are already in place, but it IS important to make sure you have the "Add to targets" checkbox(es) checked.
If you deleted the files (remove reference only) from the old group you can go into the old group's folder in Finder and drag the files from there to the new group in Project Navigator, you will need to make sure Copy if necessary is checked, but this is where end up with duplicate files on disk… In both the old group's folder and the new group's folder. This is why you want to move them to the new location first in Finder before dragging them into the new group in Project Navigator.
If you left the red files in Project Navigator sitting in the proper group, after you add the same files onto the group (copy to group not necessary since they're already in the proper location) you will end up with new (black) references to the files as well as red broken references to the same files. At this point you can just delete the red files from the group without being asked if you want to delete the files or just the reference. Leaving the red files in the new group until you have the proper (black) files showing up alongside them in Project Navigator can help to make sure that you get all of your files back into the Project Navigator.
If you're only shuffling around a couple/few files, then once you have the files moved in both the Project Navigator and in Finder to the proper locations, you can select each red reference in Project Navigator and choose the path for that particular file (in the same manner as you assigned a folder to a group). But, if you're moving around a bunch of files, this can take a long time (you can only assign one at a time), so it's better to just drop them in from Finder.
One more gotcha to look out for… It's best to just leave everything alone that sits in the "Supporting Files" group, as well as MainMenu.xib, since these are all expected to be in specific locations according to the Build Settings.
Remember: Always make sure you have a backup first (things can get out of hand if you are shuffling a LOT of files around)... Just having a snapshot probably won't help since reverting to a snapshot won't move your files on disk back to where the originally were.

How to setup Installer project with conditional file copying

I am building a VS 2010 installer, and I want to copy files to app folder depending on what options I select in UI (UI is not simple, so the only option is to show custom dialogs in Install custom action).
The problem is that custom action is actually executed after files are copied already.
One possible solution I can think of is to install all these files into the app dir, and then delete some unnesessary files in custom action. But these files are "secure" in some way, so I don't want to copy them to filesystem, even for a short period of time.
Any thoughts?
If your files shouldn't ever be on the filesystem, you have a problem in the requirements. The .msi storage itself is an open format and can be read by many tools, so if someone knows the file it's possible for them to find and extract it manually.
I agree that it's better to avoid deleting the files after they've been installed for two reasons. One: it avoids wasted work, and two: it won't cause repair scenarios due to missing files that Windows Installer thinks should be present. You should probably figure out how to determine whether these files should be present at an earlier stage of the installation, and set properties that cause this to happen (disable components by condition, or change feature states).
Most controls in MSI dialogs use installer properties. For example, a checkbox may use a property named MY_CHECKBOX which is set to a value or it's empty, based on whether the checkbox is checked or not.
These properties can be used to condition files:
select your setup project in Solution Explorer
click File System Editor button from Solution Explorer top pane
select the file you want to condition
in its Properties pane set Condition field to the condition you want, for example
MY_CHECKBOX = "value"

Add an existing folder to TFS source control

Is there any way I can add an existing folder to source control in TFS? I have created a new folder outside of TFS, just in the file system, and would like to add it to source control, but the only apparent way to do this is the ridiculous workaround of renaming my new folder to a temp name, then creating the new folder in Source Control Explorer, then adding the items from my renamed, original new folder.
Just select the folder after selecting the "Add Items to Folder..." option. You can get to this is from the context menu you get when right clicking on a folder (either the name or the actual folder itself).
The next page of the wizard will present you with lists of included and excluded files. Select the files you want and then hit "Finish".
Then submit the pending changes.
Let me share you a easier way that I just figured out.
(I was having the same trouble, and that is why I found this post.)
Drag the folder you want to add to the solution explorer and drop at the place you want to add.
Ta Ta ! It is done.
Mine is VS2010.
Before dragging and dropping or selecting Add Items To Folder, you must map the parent TFS folder to your local drive.
That is, if you want to add a C:\Stuff\HelloWorld directory to the /Top/Projects folder in TFS, you must first map /Top/Projects to C:\Stuff and then add HelloWorld.

Resources