Lau13 Posted May 1, 2013 at 01:46 PM Report #505460 Posted May 1, 2013 at 01:46 PM Boa tarde, Eu queria através de um botão criar uma pasta. Tentei fazer desta forma: System.IO.Directory.CreateDirectory("M:\Claudio\PAP") e ele não faz nada, alguém me consegue ajudar?
ribeiro55 Posted May 1, 2013 at 04:51 PM Report #505478 Posted May 1, 2013 at 04:51 PM A pasta "Claudio" existe na raiz do M: ? O user de execução tem permissões para escrever lá? Sérgio Ribeiro "Great coders aren't born. They're compiled and released""Expert coders do not need a keyboard. They just throw magnets at the RAM chips"
Lau13 Posted May 1, 2013 at 06:39 PM Author Report #505486 Posted May 1, 2013 at 06:39 PM Sim existe, a raiz M é uma flash drive, e sim eu consigo criar novas pastas lá dentro.
jpaulino Posted May 2, 2013 at 08:33 AM Report #505563 Posted May 2, 2013 at 08:33 AM E qual é o erro que dá? Implementa um bloco Try ... Catch para ver qual o erro, pois System.IO.Directory.CreateDirectory("d:\a\b\c\d\e") cria a estrutura de pastas total e não apenas a última o que quer dizer que tem de funcionar.
Lau13 Posted May 5, 2013 at 08:25 PM Author Report #505884 Posted May 5, 2013 at 08:25 PM (edited) Já está a funcionar a confusão foi o local em que a ultima pasta do caminho era o nome da nova pasta. Obrigado na mesma a todos. Edited May 5, 2013 at 08:26 PM by Lau13
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now