Dim path As String = "C:\Program Files\MyApplication\"
System.IO.Directory.Delete(path, True)
Is this going to delete the C:\ folder?
I want to make an uninstall logic, and I want to delete all files from the C:\Program Files\MyApplication\ folder.
Does deleting a folder that I want delete the whole C:\ path?
Sorry for this question but I am beginner in VB.NET
The logic you wrote will indeed delete directory C:\Program Files\MyApplication\ and all folders and files inside it.
It will not delete any other files or the C: drive.
Related
im currently setting up a cpanel.yml file and i need to copy all the file inside one specific folder in my repository to my /public_html.
/bin/cp -R build $DEPLOYPATH
the code above copy the build folder to the /public_html. But i need to copy all the file inside it not the actual build folder.
any suggestion how to do it? any help would be appreciated. thanks
I'm trying to publish artifacts and it's other folders files as well.I've read all the docs file provide by microsoft from here and used them but none of them worked for me.
I' tried File patterns as
** =>which copied all root files to ftp
**\* => which copied all sub folders file to ftp's root directory.
What I've wanted is copy folder to folder in ftp aswell.
-artifacts ftp
--a.dll --a.dll
--subfolder --subfolder
---subfolder_1.dll ---subfolder_1.dll
what's happening is
ftp
--a.dll
--subfolder_1.dll
It's copying all sub directories file to root directory of ftp.
I've use curl and ftp both giving me same result.
How can i achieve folder to folder copy in TFS 2017.
It's not related File patterns, to upload the entire folder content recursively, simply specify **.
All you have to do is checking the Preserve file paths in Advanced option.
If selected, the relative local directory structure is recreated under
the remote directory where files are uploaded. Otherwise, files are
uploaded directly to the remote directory without creating additional
subdirectories.
For example, suppose your source folder is: /home/user/source/ and
contains the file: foo/bar/foobar.txt, and your remote directory
is: /uploads/. If selected, the file is uploaded to:
/uploads/foo/bar/foobar.txt. Otherwise, to: /uploads/foobar.txt.
I am currently working on a windows Application project. I have a folder named "documents" in bin/debug that contains subfolders while the subfolders contains word document files.
When I click and drag the "documents" folder, i got a complete C:\Users\Satellite\Documents\Visual Studio 2010\Projects\WindowsExplorer_VB\WindowsExplorer_VB\bin\Debug\documents. What I want is to get the location of the folder in bin/debug so that the application can read from the directory when installed on a different machine..
Any help...
Try this:
Dim docPath As String = Path.Combine(My.Application.Info.DirectoryPath, "documents")
I am writing a MSBuild script for creating a one click deployment. Everything works great but the files are created in the app.publish under the bin directory. Is there a way to set the output directory to another directory instead of the default bin directory?
I used PublishDir but that just creates the setup.exe in the specified directory. The other files are still created under the bin directory.
Can route all the one click deployments to a specific directory or do I have to copy later?
Thanks,
Richard.
Have you tried OutputPath instead?
msbuild my_solution.sln /p:OutputPath=c:\my_dir
This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
Merging .dll with .exe
Okay, so... I have all the files of ilmerge, along with the .exe (CabalMain.exe) and the dll (crckd.dll) in one path. C:\Program Files (x86)\Microsoft\ILMerge
I shift>rightclick folder and open up command prompt.
Since I'd like to merge the two I enter:
C:\Program Files (x86)\Microsoft\ILMerge>C:\Program Files (x86)\Microsoft\ILMerg
e\ilmerge C:\Program Files (x86)\Microsoft\ILMerge\Cabalmain.exe C:\Program File
s (x86)\Microsoft\ILMerge\crckd.dll /out:C:\Program Files (x86)\Microsoft\ILMerg
e
(I believe that is the correct process to merge)
And I received
C:\Program Files (x86)\Microsoft\ILMerge>C:\Program Files (x86)\Microsoft\ILMerg
e\ilmerge C:\Program Files (x86)\Microsoft\ILMerge\Cabalmain.exe C:\Program File
s (x86)\Microsoft\ILMerge\crckd.dll /out:C:\Program Files (x86)\Microsoft\ILMerg
e
Simple instructions would be appreciated.
As you have now copied every thing in the programs folder of ilmerge (which is not wise and was adviced against in the duplicate question) the correct command (from the ilmerge folder) should be:
ilmerge cabalmain.exe crckd.dll /out:%userprofile%\cabalmainmerged.exe
If no errors are shown you can type start %userprofile% and in the explorer window that opens you should find cabalmainmerged.exe
'Could not load assembly ' means that the exe or dll files that you try to merge are not copied to the correct folder. If one of the exe or dll's depend on other assemblys they all have to be in the same folder.
Wiser is to have a folder c:\merge and copy all relevant files in that folder. Then start a commandprompt and
c:
cd\merge
then
"C:\Program Files (x86)\Microsoft\ILMerge\ilmerge" "yourexe.exe" "your1stdll.dll" /out:mergedexe.exe