Hii
Can we open a file or folder using only its name without using file path…please suggest.
Thanks in advance
This is only valid if you have this file inside your project directory. this way you can open or save any file or folder using only its name.
Regards,
Reda
Thanks for your reply reda.
If it is in a same directory,could you help me to proceed with opening a file with a name. Do you have .xaml file for this
Here is a zip containing a project to open both a file and a folder suing only their names
OpenFileByName.zip (10.0 KB)
Enjoy,
Reda
Hi reda
File is not running.
Anyway thanks for your kind reply.
One more doubt, can we get all the file name from all drive in PC and paste it in a single excel or single notepad.
I have attached a photo. Please check. That is the file you sent.
Thanks
Hi @Newton_Rich_SV . Please try to update your packages on Manage Packages option.
Try to update the packages from manage packages like the image below :
otherwise try this :
OpenFileByName.zip (10 KB)
I’ve decreased my version hope it works this time
Regards,
Reda
itz working reda…reg my previous doubt, can we get all the file name or its path from all drive in PC and paste it in a single excel or single notepad. Please help me with this
if you want to get every file in your hard disk use this :
Files = Directory.getfiles(“C:\”,“*”,searchoption.AllDirectories)
you must be admin and have permission to access on all your files
Regards,
Reda
https://stackoverflow.com/questions/13342123/how-to-get-relative-path-of-a-file-in-visual-studio
This is helpful
@reda thanks for example and explanation