move file to a shared folder in windows 7
Moderator: DosItHelp
move file to a shared folder in windows 7
So I made a batch file that cleans up the file name of a video and then moves it from my download folder to a folder that is being shared to the rest of my network. The problem I'm having is that once it moves, it isn't shared like the rest of the files in that folder. So I need to know if there is a way to make that file shared once it has been moved over. it basically moves it from one directory to another on the same drive so its real quick(no actual copying of bits). I can make it move to the network location and then it is shared, but that actually transfers the file and takes a while. Not the best solution imo. I tried using "net share" but I can't get the syntax right.
Re: move file to a shared folder in windows 7
Hmm, I'm not familiar with this stuff. I't sounds to me like the files don't inherit all features of the parent folder, because moving them changes the adress but not the properties.
Maybe removing after copying is the best way
Regards
aGerman
Maybe removing after copying is the best way
Regards
aGerman
-
- Posts: 79
- Joined: 13 Dec 2010 10:32
Re: move file to a shared folder in windows 7
In windows if you move a file to a different directory on the same drive, it will keep its NTFS permissions from where it was. If you copy the file, it inherits the permissions. Also, if you move a file to a different Windows drive (partition) or to a network drive, it actually copies the file and then deletes it after it is copied (thus following the copy rules). Your issue is definately this. The easy way is to copy and then delete. Otherwise you can look at resetting the permissions to whatever the share has from the command line with icacls for Windows Vista/7 and xcacls for WinXP. I don't have experience with them but google and /? should get you in the right direction.
Re: move file to a shared folder in windows 7
found a solution I like. Used Robocopy to copy security info. not sure if this is the technically correct approach but it works.
my batch looks like this:
...some name cleanup stuff...
move "E:\Downloads\%movie%" "E:\my movies\"
robocopy "E:\my movies" "E:\my movies" "%movie%" /COPY:S /IS
Thanks for the help. Nice forum.
my batch looks like this:
...some name cleanup stuff...
move "E:\Downloads\%movie%" "E:\my movies\"
robocopy "E:\my movies" "E:\my movies" "%movie%" /COPY:S /IS
Thanks for the help. Nice forum.