Reputation: 645
The full error message is:
'\192.168.0.10\drive - 3TB\Libraries\Videos-3TB\movies' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. The network path was not found.
I'm just trying to save all file names into a text file by running the batch file from the parent folder in the network:
@echo off
tree /f /a > Listfile.txt
pause > nul
You experts will solve this in two seconds, if you would be so kind. Please.
Upvotes: 0
Views: 30189
Reputation: 1918
Why you can't is because programs started in cmd with a network directory as current crash if the CMD is closed. You can do in some roundabout way, but as you see the correct way works best.
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
\\serenity\C$>
Upvotes: -2
Reputation: 26150
you could also map a network drive
net use z: "\\192.168.0.10\drive - 3TB\Libraries\Videos-3TB\movies"
pushd z:
tree /f /a > Listfile.txt
Upvotes: 2
Reputation: 645
Fixed it by running the file from a local directory and pointing to where it was located before when i got the error
@echo off
tree "\\192.168.0.10\Berry - 3TB\Libraries\Videos-3TB\movies" /f /a > Listfile.txt
pause > nul
Upvotes: 1