标点符号的文件夹无法打开 [英] folders with punctuation cannot able to open

查看:102
本文介绍了标点符号的文件夹无法打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在工作vb.net项目.我使用文本框将文件夹路径保存到数据库,并提供指向该路径的链接,当我单击链接时,它将打开文件夹,除标点符号外,它的工作正常,我的文件夹之一包含d''ambrossio无法打开此文件夹,您能帮我吗?

i am working vb.net project .i save folder path to database using textbox and i give link to the path ,when i click link it will open folder,it''s working fine except punctuations, one of my folder contains d''ambrossio this folder cannot opened can u please help me

推荐答案

您将需要重命名不带'字符的文件夹.使用Path.GetInvalidFileNameChars返回类型为Char的数组,以查看在命名文件和文件夹时无法使用的所有字符.

您还可以使用Path.GetInvalidPathChars获取非法的 path 字符的Char数组.
You will need to rename the folder without the '' character. Use the Path.GetInvalidFileNameChars to return an array of type Char to see all the characters you cannot use when naming files and folders.

You can also use Path.GetInvalidPathChars to get a Char array of illegal path characters.


hi

try this

Replace(folder_path, "'", "''")


这篇关于标点符号的文件夹无法打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆