I'm wondering if anyone here would have a bit of experience parsing commandline variables. My dilemma is this:
I'm building a custom context menu to copy files (or folders) from one location to another. Now it's working pretty well, with the exception that if I highlight a folder and run xcopy on that folder, it simply copies the files within that folder to the destination as opposed to creating the folder there and placing the files inside of it.
My command for this looks like:
cmd /c xcopy /e "%1" \\server\share\
Now the thing I thought about was maybe attempting to do this with a batch file. Run say, copy-site.bat which creates the remote directory then copies the files to it. But this doesn't go over well since %1 is the full pathname (i.e. C:\Documents and Settings\User\test) to the location as opposed to relative (test).
Now I have been able to do an alternative here, by adding a shortcut into the "Send To" location, which makes this a lot easier since it's integrated into Windows and doesn't have this shortfall--but I'd much rather have it directly on the context menu as opposed to in Send To.
Anyone know of any alternative ways to do this without having to have some program loaded 24/7?
I'm building a custom context menu to copy files (or folders) from one location to another. Now it's working pretty well, with the exception that if I highlight a folder and run xcopy on that folder, it simply copies the files within that folder to the destination as opposed to creating the folder there and placing the files inside of it.
My command for this looks like:
cmd /c xcopy /e "%1" \\server\share\
Now the thing I thought about was maybe attempting to do this with a batch file. Run say, copy-site.bat which creates the remote directory then copies the files to it. But this doesn't go over well since %1 is the full pathname (i.e. C:\Documents and Settings\User\test) to the location as opposed to relative (test).
Now I have been able to do an alternative here, by adding a shortcut into the "Send To" location, which makes this a lot easier since it's integrated into Windows and doesn't have this shortfall--but I'd much rather have it directly on the context menu as opposed to in Send To.
Anyone know of any alternative ways to do this without having to have some program loaded 24/7?