MediaSmartServer.net
http://www.mediasmartserver.net/forums/

Is it possible to access the files from a DOS prompt?
http://www.mediasmartserver.net/forums/viewtopic.php?f=1&t=9772
Page 1 of 1

Author:  sygyzy [ Mon Dec 20, 2010 1:46 pm ]
Post subject:  Is it possible to access the files from a DOS prompt?

I have a bunch of movies that I want to move into indivudual folders. So for example:

\Movies\A Wonderful Life.avi becomes
\Movies\A Wonderful Life\A Wonderful Life.avi

The purpose of this is so I can run my own metadata program and store information in each folder, thus saving me time in case I need to reinstall XBMC (it does not have a working backup feature).

In the past, when the files were on my local PC, I just ran a batch script that a friend wrote. But now, the files are stored exclusively on my WHS. I don't claim to know how the file system in WHS works entirely but I am pretty sure it spans across disks. With that said, is there any way to access the files (for manipulation) via the command prompt?

Author:  yakuza [ Mon Dec 20, 2010 1:58 pm ]
Post subject:  Re: Is it possible to access the files from a DOS prompt?

Damian mentions doing this in his Media Browser write-up in the Prep Work section but doesn't go into specifics:
http://www.mediasmartserver.net/2010/11 ... 2-9-orion/

Are you trying to access the files from your local pc, or on the server?

On the client pc:
\\server\videos\

on the server:
D:\shares\videos\

Author:  TxDot [ Mon Dec 20, 2010 2:04 pm ]
Post subject:  Re: Is it possible to access the files from a DOS prompt?

Just use the UNC format for the directories and you should have no problem. e.g. dir \\myhpwhs\movies will produce a directory listing just as if you were doing it to a folder on your local PC. I believe most of the DOC commands you'll be using support UNC style paths.

Author:  sygyzy [ Mon Dec 20, 2010 3:13 pm ]
Post subject:  Re: Is it possible to access the files from a DOS prompt?

I need the DOS path to be used while I run while I am in a command prompt. Does this look correct?

D:\shares\Videos

Is it safe to manipulate files in this environment? I remember that you should always copy and delete files via the "Shared Folders on Server" link, and not through Windows Explorer, so that makes me nervous to edit them in DOS.

Author:  sygyzy [ Mon Dec 20, 2010 3:14 pm ]
Post subject:  Re: Is it possible to access the files from a DOS prompt?

TxDot wrote:
Just use the UNC format for the directories and you should have no problem. e.g. dir \\myhpwhs\movies will produce a directory listing just as if you were doing it to a folder on your local PC. I believe most of the DOC commands you'll be using support UNC style paths.


At first I was confused about what you were trying to say but I think you're saying instead of running the script from the WHS itself, why not run it from a client computer and just use the network path? Hmm that's a great idea.

Author:  sygyzy [ Mon Dec 20, 2010 3:33 pm ]
Post subject:  Re: Is it possible to access the files from a DOS prompt?

Hmm

E:\>cd \\zion\videos\movies
'\\zion\videos\movies'
CMD does not support UNC paths as current directories.

Author:  ER217 [ Mon Dec 20, 2010 3:52 pm ]
Post subject:  Re: Is it possible to access the files from a DOS prompt?

You could just map a drive to your share.

i.e. "net use Z: \\zion\videos\movies"

Now "Z:\" is the same as \\zion\videos\movies.

Hope this is what you where looking for....

Author:  TxDot [ Mon Dec 20, 2010 4:23 pm ]
Post subject:  Re: Is it possible to access the files from a DOS prompt?

sygyzy wrote:
Hmm

E:\>cd \\zion\videos\movies
'\\zion\videos\movies'
CMD does not support UNC paths as current directories.

You can't CD to a directory like that but you don't need to. Your other option is to mount the directory to an available drive letter but that (to me anyway) is more trouble than it's worth. But to each his own... :beerme: You can use mkdir \\myhpwhs\blah\newdir and then use copy \\myhpwhs\blah\olddir \\myhpwhs\blah\newdir or something like that.

Author:  sygyzy [ Mon Dec 20, 2010 4:48 pm ]
Post subject:  Re: Is it possible to access the files from a DOS prompt?

The mount worked perfectly. I used Z: just like the example. For some reason my script doesn't support spaces. It moved any movies with a single word in the title like "Captivity" but failed on anything with spaces like "Eastern Promises" It also messed up by creating a bunch of empty folders with names from words from movies such as A, An, Edge, etc. I cleaned the empty folders up but can someone help me fix the script to support movies with spaces?

for /f %f in ('Dir /b') do mkdir %~nf & move %f %~nf/%f

Author:  sygyzy [ Mon Dec 20, 2010 4:55 pm ]
Post subject:  Re: Is it possible to access the files from a DOS prompt?

I may have find a .NET program that does exactly what I need.

Edit: Yup, FiletoFolder worked exactly as described. Thanks to everyone for their help.

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/