Is it possible to access an NAS drive via CMD and copy all file names from it into a specific file?
There is a way within Windows to access a certain folder and copy all of it's contents names into a text file.
For example if I am in C:UsersmyusernameDocuments
And in the command line I type dir > C:dir.txt
, when I navigate into the Documents folder, there will be a text file named 'dir.txt', I can now open it and all the names of all the files within my Documents folder will be there (unless thres nothing inside Documents).
My problem is a bit different.
I am trying to access an NAS Drive. The path of the file in my example is \10.51.0.11nasWhatever320PSTs_from_Whatever
.
If I try to navigate here from the command prompt I receive the error:
CMD does not support UNC paths as current directories.
I have many, thousands of file names to copy and paste into Excel from this drive and I need a way of doing it other than manually.
The option of copying and pasting these files is out of the question as it would take many days to make copies from the NAS onto my local network or computer.
windows-7 windows microsoft-office
add a comment |
There is a way within Windows to access a certain folder and copy all of it's contents names into a text file.
For example if I am in C:UsersmyusernameDocuments
And in the command line I type dir > C:dir.txt
, when I navigate into the Documents folder, there will be a text file named 'dir.txt', I can now open it and all the names of all the files within my Documents folder will be there (unless thres nothing inside Documents).
My problem is a bit different.
I am trying to access an NAS Drive. The path of the file in my example is \10.51.0.11nasWhatever320PSTs_from_Whatever
.
If I try to navigate here from the command prompt I receive the error:
CMD does not support UNC paths as current directories.
I have many, thousands of file names to copy and paste into Excel from this drive and I need a way of doing it other than manually.
The option of copying and pasting these files is out of the question as it would take many days to make copies from the NAS onto my local network or computer.
windows-7 windows microsoft-office
add a comment |
There is a way within Windows to access a certain folder and copy all of it's contents names into a text file.
For example if I am in C:UsersmyusernameDocuments
And in the command line I type dir > C:dir.txt
, when I navigate into the Documents folder, there will be a text file named 'dir.txt', I can now open it and all the names of all the files within my Documents folder will be there (unless thres nothing inside Documents).
My problem is a bit different.
I am trying to access an NAS Drive. The path of the file in my example is \10.51.0.11nasWhatever320PSTs_from_Whatever
.
If I try to navigate here from the command prompt I receive the error:
CMD does not support UNC paths as current directories.
I have many, thousands of file names to copy and paste into Excel from this drive and I need a way of doing it other than manually.
The option of copying and pasting these files is out of the question as it would take many days to make copies from the NAS onto my local network or computer.
windows-7 windows microsoft-office
There is a way within Windows to access a certain folder and copy all of it's contents names into a text file.
For example if I am in C:UsersmyusernameDocuments
And in the command line I type dir > C:dir.txt
, when I navigate into the Documents folder, there will be a text file named 'dir.txt', I can now open it and all the names of all the files within my Documents folder will be there (unless thres nothing inside Documents).
My problem is a bit different.
I am trying to access an NAS Drive. The path of the file in my example is \10.51.0.11nasWhatever320PSTs_from_Whatever
.
If I try to navigate here from the command prompt I receive the error:
CMD does not support UNC paths as current directories.
I have many, thousands of file names to copy and paste into Excel from this drive and I need a way of doing it other than manually.
The option of copying and pasting these files is out of the question as it would take many days to make copies from the NAS onto my local network or computer.
windows-7 windows microsoft-office
windows-7 windows microsoft-office
edited Sep 10 '15 at 21:57
JakeGould
32.2k1098141
32.2k1098141
asked Sep 10 '15 at 21:17
Space GhostSpace Ghost
5361916
5361916
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You can tell dir
what path to list. So you could use:
dir \10.51.0.11nasWhatever320PSTs_from_Whatever > C:dir.txt
Thanks for the reply. I don't get the error I used to anymore, however the message I get is 'Access Denied' even when I run CMD as administrator.
– Space Ghost
Sep 10 '15 at 21:26
@SpaceGhost Sounds like you need to ensure you've got proper permission to that folder. Can you navigate to the path via Windows Explorer?
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:29
@Techie007, Yes, I can.
– Space Ghost
Sep 10 '15 at 21:31
You're correct. I've been an idiot. I can't access it via Windows Explorer. I access this file path via a drive that's shared on our server. The path is a shortcut inside my folder and I navigate to it through that. Thank you for clearing that mistake up. I will attempt something else, if it works, I will post it and accept your answer. :)
– Space Ghost
Sep 10 '15 at 21:37
Ahh, it may be because you're trying to save the dir.txt output file to the root of C:, which is not allowed (that's what's giving you the access denied error). Try justdir \10.51.0.11nasWhatever320PSTs_from_Whatever
on it's own. Does it give you the list? If so, then make a folder and use something likedir \10.51.0.11nasWhatever320PSTs_from_Whatever > C:<folder you made>dir.txt
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:37
|
show 1 more comment
Try below steps,
- Use "map network drive" to attach the NAS folder path to a drive name eg. z: or X:.
- From the cmd try accessing the network path by typing "z:" and hit enter.
- Now you can execute any command you want on the NAS folder
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f971282%2fis-it-possible-to-access-an-nas-drive-via-cmd-and-copy-all-file-names-from-it-in%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can tell dir
what path to list. So you could use:
dir \10.51.0.11nasWhatever320PSTs_from_Whatever > C:dir.txt
Thanks for the reply. I don't get the error I used to anymore, however the message I get is 'Access Denied' even when I run CMD as administrator.
– Space Ghost
Sep 10 '15 at 21:26
@SpaceGhost Sounds like you need to ensure you've got proper permission to that folder. Can you navigate to the path via Windows Explorer?
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:29
@Techie007, Yes, I can.
– Space Ghost
Sep 10 '15 at 21:31
You're correct. I've been an idiot. I can't access it via Windows Explorer. I access this file path via a drive that's shared on our server. The path is a shortcut inside my folder and I navigate to it through that. Thank you for clearing that mistake up. I will attempt something else, if it works, I will post it and accept your answer. :)
– Space Ghost
Sep 10 '15 at 21:37
Ahh, it may be because you're trying to save the dir.txt output file to the root of C:, which is not allowed (that's what's giving you the access denied error). Try justdir \10.51.0.11nasWhatever320PSTs_from_Whatever
on it's own. Does it give you the list? If so, then make a folder and use something likedir \10.51.0.11nasWhatever320PSTs_from_Whatever > C:<folder you made>dir.txt
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:37
|
show 1 more comment
You can tell dir
what path to list. So you could use:
dir \10.51.0.11nasWhatever320PSTs_from_Whatever > C:dir.txt
Thanks for the reply. I don't get the error I used to anymore, however the message I get is 'Access Denied' even when I run CMD as administrator.
– Space Ghost
Sep 10 '15 at 21:26
@SpaceGhost Sounds like you need to ensure you've got proper permission to that folder. Can you navigate to the path via Windows Explorer?
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:29
@Techie007, Yes, I can.
– Space Ghost
Sep 10 '15 at 21:31
You're correct. I've been an idiot. I can't access it via Windows Explorer. I access this file path via a drive that's shared on our server. The path is a shortcut inside my folder and I navigate to it through that. Thank you for clearing that mistake up. I will attempt something else, if it works, I will post it and accept your answer. :)
– Space Ghost
Sep 10 '15 at 21:37
Ahh, it may be because you're trying to save the dir.txt output file to the root of C:, which is not allowed (that's what's giving you the access denied error). Try justdir \10.51.0.11nasWhatever320PSTs_from_Whatever
on it's own. Does it give you the list? If so, then make a folder and use something likedir \10.51.0.11nasWhatever320PSTs_from_Whatever > C:<folder you made>dir.txt
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:37
|
show 1 more comment
You can tell dir
what path to list. So you could use:
dir \10.51.0.11nasWhatever320PSTs_from_Whatever > C:dir.txt
You can tell dir
what path to list. So you could use:
dir \10.51.0.11nasWhatever320PSTs_from_Whatever > C:dir.txt
answered Sep 10 '15 at 21:20
Ƭᴇcʜιᴇ007Ƭᴇcʜιᴇ007
99.9k14158221
99.9k14158221
Thanks for the reply. I don't get the error I used to anymore, however the message I get is 'Access Denied' even when I run CMD as administrator.
– Space Ghost
Sep 10 '15 at 21:26
@SpaceGhost Sounds like you need to ensure you've got proper permission to that folder. Can you navigate to the path via Windows Explorer?
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:29
@Techie007, Yes, I can.
– Space Ghost
Sep 10 '15 at 21:31
You're correct. I've been an idiot. I can't access it via Windows Explorer. I access this file path via a drive that's shared on our server. The path is a shortcut inside my folder and I navigate to it through that. Thank you for clearing that mistake up. I will attempt something else, if it works, I will post it and accept your answer. :)
– Space Ghost
Sep 10 '15 at 21:37
Ahh, it may be because you're trying to save the dir.txt output file to the root of C:, which is not allowed (that's what's giving you the access denied error). Try justdir \10.51.0.11nasWhatever320PSTs_from_Whatever
on it's own. Does it give you the list? If so, then make a folder and use something likedir \10.51.0.11nasWhatever320PSTs_from_Whatever > C:<folder you made>dir.txt
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:37
|
show 1 more comment
Thanks for the reply. I don't get the error I used to anymore, however the message I get is 'Access Denied' even when I run CMD as administrator.
– Space Ghost
Sep 10 '15 at 21:26
@SpaceGhost Sounds like you need to ensure you've got proper permission to that folder. Can you navigate to the path via Windows Explorer?
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:29
@Techie007, Yes, I can.
– Space Ghost
Sep 10 '15 at 21:31
You're correct. I've been an idiot. I can't access it via Windows Explorer. I access this file path via a drive that's shared on our server. The path is a shortcut inside my folder and I navigate to it through that. Thank you for clearing that mistake up. I will attempt something else, if it works, I will post it and accept your answer. :)
– Space Ghost
Sep 10 '15 at 21:37
Ahh, it may be because you're trying to save the dir.txt output file to the root of C:, which is not allowed (that's what's giving you the access denied error). Try justdir \10.51.0.11nasWhatever320PSTs_from_Whatever
on it's own. Does it give you the list? If so, then make a folder and use something likedir \10.51.0.11nasWhatever320PSTs_from_Whatever > C:<folder you made>dir.txt
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:37
Thanks for the reply. I don't get the error I used to anymore, however the message I get is 'Access Denied' even when I run CMD as administrator.
– Space Ghost
Sep 10 '15 at 21:26
Thanks for the reply. I don't get the error I used to anymore, however the message I get is 'Access Denied' even when I run CMD as administrator.
– Space Ghost
Sep 10 '15 at 21:26
@SpaceGhost Sounds like you need to ensure you've got proper permission to that folder. Can you navigate to the path via Windows Explorer?
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:29
@SpaceGhost Sounds like you need to ensure you've got proper permission to that folder. Can you navigate to the path via Windows Explorer?
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:29
@Techie007, Yes, I can.
– Space Ghost
Sep 10 '15 at 21:31
@Techie007, Yes, I can.
– Space Ghost
Sep 10 '15 at 21:31
You're correct. I've been an idiot. I can't access it via Windows Explorer. I access this file path via a drive that's shared on our server. The path is a shortcut inside my folder and I navigate to it through that. Thank you for clearing that mistake up. I will attempt something else, if it works, I will post it and accept your answer. :)
– Space Ghost
Sep 10 '15 at 21:37
You're correct. I've been an idiot. I can't access it via Windows Explorer. I access this file path via a drive that's shared on our server. The path is a shortcut inside my folder and I navigate to it through that. Thank you for clearing that mistake up. I will attempt something else, if it works, I will post it and accept your answer. :)
– Space Ghost
Sep 10 '15 at 21:37
Ahh, it may be because you're trying to save the dir.txt output file to the root of C:, which is not allowed (that's what's giving you the access denied error). Try just
dir \10.51.0.11nasWhatever320PSTs_from_Whatever
on it's own. Does it give you the list? If so, then make a folder and use something like dir \10.51.0.11nasWhatever320PSTs_from_Whatever > C:<folder you made>dir.txt
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:37
Ahh, it may be because you're trying to save the dir.txt output file to the root of C:, which is not allowed (that's what's giving you the access denied error). Try just
dir \10.51.0.11nasWhatever320PSTs_from_Whatever
on it's own. Does it give you the list? If so, then make a folder and use something like dir \10.51.0.11nasWhatever320PSTs_from_Whatever > C:<folder you made>dir.txt
– Ƭᴇcʜιᴇ007
Sep 10 '15 at 21:37
|
show 1 more comment
Try below steps,
- Use "map network drive" to attach the NAS folder path to a drive name eg. z: or X:.
- From the cmd try accessing the network path by typing "z:" and hit enter.
- Now you can execute any command you want on the NAS folder
add a comment |
Try below steps,
- Use "map network drive" to attach the NAS folder path to a drive name eg. z: or X:.
- From the cmd try accessing the network path by typing "z:" and hit enter.
- Now you can execute any command you want on the NAS folder
add a comment |
Try below steps,
- Use "map network drive" to attach the NAS folder path to a drive name eg. z: or X:.
- From the cmd try accessing the network path by typing "z:" and hit enter.
- Now you can execute any command you want on the NAS folder
Try below steps,
- Use "map network drive" to attach the NAS folder path to a drive name eg. z: or X:.
- From the cmd try accessing the network path by typing "z:" and hit enter.
- Now you can execute any command you want on the NAS folder
answered Jan 25 at 0:39
Raphael OscarRaphael Oscar
111
111
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f971282%2fis-it-possible-to-access-an-nas-drive-via-cmd-and-copy-all-file-names-from-it-in%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown