Change drive letter for .lnk-shortcuts with vb.net - vb.net

I got multiple windows shortcuts that target another drive than the one I use now. I want to copy all the shortcuts and change the "target-value" for these files.
Example:
file name: Movie-Trainspotting.lnk
file place: D:\MovieVault
target: "A:\Movies\Movie-Trainspotting.avi"
open in: "A:\Movies"
My goal is to find a way to replace the letter A with example H.
Keep in mind that I got many files wich needs this, I would prefer a for each loop that target all the files in a spesific folder (txtbSti.Text)
Is there a way to do this, as simple as possible?

Related

How to change the path in files when moving a directory in the PhpStorm

In PhpStorm there is a function, when you re-create a file, it is renamed in the entire project. Neither can I find out if there is a function so that when transferring one folder to another.
For example:
in the /abc/def/ghi/ structure
you need to move /ghi/ directly under /abc/
and that in the files where the mention of /abc/def/ghi/ will became /abc/ghi/
The functional as in renaming interests. About the mass replacement through Ctrl + Shift + R I know, but then you must first move the folder, then look for files where something is wrong, but I want it to be more automated and do it all myself.
The answer is, it works just like this, I just installed the old version, updated it, everything works as I wanted out of the box, there's nothing to think about.
Was PhpStorm 7

VB.NET Opening A File From Form

I'm using the following the code to open a file that resides elsewhere on the computer:
System.Diagnostics.Process.Start(PathToOpen)
Where PathToOpen is the full address to the file I wish to open. This appears to work as intended for any file type that has an application installed that can open the file.
Whilst this works OK, if the file is on a networked drive, I want my VB.Net code to check if the file is currently in use, if so display a message. Currently what happens is if a second user tries to open the file, it opens read-only (a word file for example) which is handled outside of my application. I want to intercept before the file is opened and stop the process there.
Is this possible at all?
You are basically asking if it's possible to monitor files on a system that doesn't even belong to you ?
Word does know about a file already in use because it creates a hidden file next to the one you open. if there is already a hidden file, it means the file is already in use.
Other applications use different ways of knowing if a file they can use is already opened somewhere else.
In order to do what you want to do, you need to know how all the applications handle this problem...
A possible solution would be for you to create a small hidden file next to the file the user wants to open (just like MS Word does). Only problem, you need to destroy the file when it's closed by the user, and you have no way of knowing that...

PHPStorm navigate to file by name and path using fuzzy search

I am switching from Vim to PHPStorm. In Vim I had a plugin called CtrlP which could be used to search for files with its path using fuzzy logic.
For example, searching for the string "defaorderwid"
Would suggest the file "themes/default/views/order/widget.php"
(Sublime also has this functionality too ("Goto Anything"), available via Ctrl+P.)
How can I do something similar in PHPStorm? I am aware of Ctrl+Shift+N search, but it searches only names of files without paths.
It is important for me because in current project I have many files named "widget.php" in different folders.
Press Shift, Shift (twice). Then enter widget.php and prepend the folder, or parts of it. Works for me.
They call it "Search Everywhere", or "Double-Shift" feature.
If you want to use abbreviations, you can CamelCase or or CamelHumps or SnakeCase your search, or use Wildcards (*). Read here.
if you have files like:
/buildings/users/create.blade.php
/rooms/users/create.blade.php
/parks/users/create.blade.php
you can search like that:
1. double press SHIFT
2. type: buil/creat (first letters of folder and file)
3. PHPStorm will find: buildings/users/create.blade.php
If you are looking for a file (or directory) you can use:
Windows: Ctrl+Shift+N
macOS: Cmd+Shift+O
(Double tapping Shift works too, but it also searches for classes, symbols and actions, and so is slower.)
Despite what you say, it does search for fragments of directories and filenames --
but only if they're separated by slashes:
Developers have been asking JetBrains for this without the need for "/". Register your desire for it to be added here: IDEA-112841
If you are looking for file in a particular path use Ctrl+Shift+N
whith : themes/d/vs//widget Or t/d/v/o/wid etc ...
will display widget.php file in themes/default/views/order path

Transferring Intellij Live Templates Between Machines

I'm trying to figure out how to transfer the templates in the /.IdeaC10/config/templates/user.xml file to my coworker's machines.
If I copy into the user.xml file, then those changes seem to be getting squashed by Intellij, reverting to the old file contents.
Anyone know how to work around this?
EDIT:
Is there any way to do this by copying and pasting the xml? That would be preferrable...!
Use File | Imprort/Export Settings.
An improved and easier way
This allows you to share them easily between collegues.
You can select multiple live templates and then copy them (right click and select copy, or ctrl+c). This gives you XML-descriptions in your clipboard you can send to others.
Other can then take that XML, and paste it into a "Template Group". Right click one of the groups and select Paste. If the option is greyed out, you didn't select a group but something else.
If you have Settings Repository set you may find your Live Templates stored in
<your_user_home_directory>\
.IntelliJIdea<version>\
config\
settingsRepository\
repository\
templates
the technique of copying and pasting the xml file on another computer in the correct directory, function perfectly for me! But the name of my template file is android.xml for my Android developments. Maybe the file name "user" is protected. Try maybe with a different file name
You need to create the required custom template groups and update the relevant predefined groups as necessary and click OK. Based on these changes, IntelliJ IDEA generates the <group_name>.xml files, see Location of Custom Live Templates Definitions above.
Depending on the operating system you are using, the .xml files are stored at the following locations:
Windows: <your_user_home_directory>.IntelliJ IDEA<version_number>\config\templates
Linux: ~IntelliJ IDEA<version>\config\templates
OS X: ~/Library/Preferences/IntelliJ IDEA<version>/templates
Refer to Intellij Help article.

Are Objective-C function names stored in text?

I don't remember where I heard about it, (I think I was searching up on how selectors worked and it ended up not being exactly the same as a callback function) and I can't confirm it. But more importantly than that, is there a way I could get a list of the function names from another application?
See class-dump.
You can sometimes see a list of the method names in an application. Find the .ipa file for the app (possibly in the Music->iTunes->Mobile Applications directory on a Mac). Make a copy of one of the ipa files and change it from .ipa to .zip. Unzip the file and in the Payload folder, there's a file with the same name as the app. Right click on it and "Show Package Contents". In there, you'll find another file with the same name as the app (with no extension). This is the executable file for the app. If you open it in a text editor like BBEdit, you'll sometimes be able to see some method names, as well as a list of the frameworks the app is built against. You can find the path name where things were kept too, often with the developer's name.
For example, looking into the Japanese dicitonary Daijirin, I can see these methods:
-[HMWebSupport openMONOKAKIDOSupportWithSafariForView:style:]
-[HistoryViewController viewWillAppear:]
I can also see that one of the developers was called Norihito, and he was using SVN: /Users/norihito/Developer/SVN/Mobile/DAIJIRIN/Other
Other applications (like Weightbot) don't show as much information. I don't know the reason it shows up some times and doesn't other times.