Find all files,folders and sub-folders inside a Shared Locat

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
akbarsha03
Posts: 7
Joined: 25 Apr 2013 09:55

Find all files,folders and sub-folders inside a Shared Locat

#1 Post by akbarsha03 » 29 Apr 2013 11:18

Hi Geeks,

I am trying write a batch file to generate a excel file which will have the path of all files, folders,sub-folders and files inside sub-folders from a shared location.
When i tried using the following code, it works perfect in my local machine but it does not helps me to get data from the shared location. Please help me on this.

echo off
dir /s/b C:\*.* > files.xls

The above code gives me the path of all folders, files inside my C drive but when i am changing the path from "C:\" to shared location "\\PLS10\apple\" it does not work. Is this possible?

How and Where i need to insert my shared location path to get all files and folders inside the shared location..

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Find all files,folders and sub-folders inside a Shared L

#2 Post by foxidrive » 29 Apr 2013 11:41

akbarsha03 wrote:Hi Geeks,
echo off
dir /s/b C:\*.* > files.xls

The above code gives me the path of all folders, files inside my C drive but when i am changing the path from "C:\" to shared location "\\PLS10\apple\" it does not work.


It will work if you have permissions to access the location. Do you get an error message on the console?

akbarsha03
Posts: 7
Joined: 25 Apr 2013 09:55

Re: Find all files,folders and sub-folders inside a Shared L

#3 Post by akbarsha03 » 29 Apr 2013 12:57

foxidrive wrote:
akbarsha03 wrote:Hi Geeks,
echo off
dir /s/b C:\*.* > files.xls

The above code gives me the path of all folders, files inside my C drive but when i am changing the path from "C:\" to shared location "\\PLS10\apple\" it does not work.


It will work if you have permissions to access the location. Do you get an error message on the console?



I'm getting an Error message as "the network path was not found" or "File not found", Though I have Admin access to the Folder. Its generating only empty excel file

Thanks in advance

akbarsha03
Posts: 7
Joined: 25 Apr 2013 09:55

Re: Find all files,folders and sub-folders inside a Shared L

#4 Post by akbarsha03 » 29 Apr 2013 13:32

akbarsha03 wrote:
foxidrive wrote:
akbarsha03 wrote:Hi Geeks,
echo off
dir /s/b C:\*.* > files.xls

The above code gives me the path of all folders, files inside my C drive but when i am changing the path from "C:\" to shared location "\\PLS10\apple\" it does not work.


It will work if you have permissions to access the location. Do you get an error message on the console?



I'm getting an Error message as "the network path was not found" or "File not found", Though I have Admin access to the Folder. Its generating only empty excel file

Thanks in advance



I've tried without *.* and it works fine..... So Weird!!

Post Reply