"exist" command usage question
Mostrar comentarios más antiguos
Hello everyone. I wanted to know if it is possible to use a the "exist" command to check if a directory exists, nomater the username of the user eg. check=exist('C:\Users\<user_name>\---\---\---\somedit','dir') Is there a way to somehow get the username or something?
1 comentario
Jan
el 14 de En. de 2012
What is "---"?
Respuesta aceptada
Más respuestas (1)
Andreas Goser
el 14 de En. de 2012
0 votos
I'd say once you know the file exits on the path, the WHICH command will also be able to find the file - and return the path. Only thing left is to do a reasonable string operation to isolate the username part.
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!