Little-Miss Posted September 26, 2012 Posted September 26, 2012 Trying to install new version of Wordshark. It currently just runs from the server, but im all for giving the pc's the workload. According to the intructions i need to deploy two folders to the client whilst the shared data stays on the server. How and also where is the best place to put these on the client?
sted Posted September 26, 2012 Posted September 26, 2012 simplest if its more that 2 or 3 files then easiest way is a startup script copy folders\files to \\server\share\wordshark\ (replace with your real location) if exist "c:\program files\wordshark\folder1" goto end xcopy "\\server\share\wordshark\" c:\program files\wordshark\" /c/e/h/y/s :end 1
Little-Miss Posted September 26, 2012 Author Posted September 26, 2012 Ok, can i do the if exist twice? '\\Curricsvr1\netlogon\Tools' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. C:\Windows>if exist "c:\program files\wordshark\wordshark-public" goto end C:\Windows>if exist "c:\program files\wordshark\wordshark-programs" goto end C:\Windows>xcopy "\\curricsvr1\apps\wordshark 4.8\" c:\program files\wordshark\" /c/e/h/y/s Parse Error This is me just testing to see if it works.. Not quite sure what its issue is with the UNC path? Go on, what daft mistake have i made?
andy_b Posted September 26, 2012 Posted September 26, 2012 I see the UNC message as mostly a warning more than an error More details: Cmd.exe does not support UNC names as the current directory. I've never had a problem, only issues i can see is if you are not explicitly supplying full path names and are trying to relate them to the "current unc path". You do seem to be missing an " though on the copy line. There should be one before the c:\ 1
Little-Miss Posted September 26, 2012 Author Posted September 26, 2012 oooh, i'll blame the fact that im drugged up to the eyeballs trying to nip a migraine in the bud!
sted Posted September 26, 2012 Posted September 26, 2012 Ok, can i do the if exist twice? This is me just testing to see if it works.. Not quite sure what its issue is with the UNC path? Go on, what daft mistake have i made? youre missing a " xcopy "\\curricsvr1\apps\wordshark 4.8\" c:\program files\wordshark\" /c/e/h/y/s should be xcopy "\\curricsvr1\apps\wordshark 4.8\" "c:\program files\wordshark\" /c/e/h/y/s
Little-Miss Posted September 26, 2012 Author Posted September 26, 2012 Got it right 4th time! lolz Now to get it to run on startup....
sted Posted September 26, 2012 Posted September 26, 2012 Got it right 4th time! lolz Now to get it to run on startup.... and thats why i gave up programming spend ages doing some code only to be foiled by a single letter which takes longer to find than it did to write the code lol
penfold Posted September 26, 2012 Posted September 26, 2012 Alternatibe to scripting could you have done this through GPP under the computer startup>Windows Settings> Files/Folders. Use Item level targetting to check if the folder exists should do the same thing without having to check syntax.
sted Posted September 26, 2012 Posted September 26, 2012 Alternatibe to scripting could you have done this through GPP under the computer startup>Windows Settings> Files/Folders. Use Item level targetting to check if the folder exists should do the same thing without having to check syntax. true but you have to specify each individual item in a folder so say a folder has 50 files in it its a pain via gpp
Little-Miss Posted September 26, 2012 Author Posted September 26, 2012 Thank you @penfold because i was originally trying to find that! Great to know anyway!
sparkeh Posted September 26, 2012 Posted September 26, 2012 true but you have to specify each individual item in a folder so say a folder has 50 files in it its a pain via gpp Not true, use the Files Extension to copy the files in one go: Group Policy includes the Files preference extension. For computers or users, this extension allows you to: Copy a file (or multiple files in one folder) to a new location and then configure the attributes of those files. New subfolders are created as necessary.
sted Posted September 26, 2012 Posted September 26, 2012 Not true, use the Files Extension to copy the files in one go: where im on an 08r2 box and cant see any way of doing multi files
sparkeh Posted September 26, 2012 Posted September 26, 2012 where im on an 08r2 box and cant see any way of doing multi files Looking at r2 here as well, directly above the 'Folders' option in GPPs is 'Files' - you specify a source and destination and it copies.
sted Posted September 26, 2012 Posted September 26, 2012 Looking at r2 here as well, directly above the 'Folders' option in GPPs is 'Files' - you specify a source and destination and it copies. if i select a folder it just opens it thats how ive been doing odd files like ini files
sparkeh Posted September 26, 2012 Posted September 26, 2012 But have you ever tried using wildcards in the source path? From the GPP help: Source file(s) Type the location from which to copy the Source file(s). This location can be a fully qualified UNC path or a path on a local or mapped drive from the perspective of the client. This field can contain variables. This field can also contain single character (?) and multiple character (*) wildcards, allowing you to copy or modify multiple files. This option is available only if the action selected is Create, Replace, or Update.
sted Posted September 26, 2012 Posted September 26, 2012 But have you ever tried using wildcards in the source path? From the GPP help: honesly no as its gui based i assumed it would let me shift/control/folder select if it allowed it hmm i will have to have a look at that one day. so instead of having \\server\share\folder\file1.txt i could paste \\server\share\folder\*.txt there etc?
sparkeh Posted September 26, 2012 Posted September 26, 2012 Only just noticed this, but if you put a * in the path the 'Destination file' box is relabelled to 'Destination folder' (not completely intuitive!) So yeah you put source = "\\some_server_share\files\*" and destination = "c:\files_here_please" and all the files would be copied from the server share to the local machine. 1
sted Posted September 26, 2012 Posted September 26, 2012 its letting me do it but files arnt being copied (granted its a slightly lazy copy from netlogon to test) and the folder exists i gppd that as well that worked fine
penfold Posted September 26, 2012 Posted September 26, 2012 its letting me do it but files arnt being copied (granted its a slightly lazy copy from netlogon to test) and the folder exists i gppd that as well that worked fine [ATTACH=CONFIG]15315[/ATTACH] I've done it without the *.* in the destination...so you would have C:\Test01\. Not sure if that makes a difference or not to be honest. 1
sted Posted September 26, 2012 Posted September 26, 2012 (edited) I've done it without the *.* in the destination...so you would have C:\Test01\. Not sure if that makes a difference or not to be honest. yup sigh dosent seem to do subfolders though (though that may just be a case of waiting i suppose after gpupdate /force) typical i log off give it one last check and my extra folder copied across Edited September 26, 2012 by sted
mavhc Posted September 26, 2012 Posted September 26, 2012 Numbershark and Wordshark - Wiki Or use blinksync.exe
cpjitservices Posted September 27, 2012 Posted September 27, 2012 If im scripting a file / folder copy in the script I usually add a drive mount, and then once the copy is finished do a "net use * /del /yes" or only dismount the drive im copying from. I hope you get what I mean, It seems to be the quickest way I've found of doing things like this. I have a logon tracker that does just this except it writes to a log file rather than copy a file. So when a user logs in the drive is mounted then the logon details of that user using variables like time, date. machine name, user name etc are all added to the log file and its all done that quick the users never see the mapped drive, and if they try to access it they cant anyway. Hope this helps.
Little-Miss Posted September 27, 2012 Author Posted September 27, 2012 Ok, heres a question. Say the script is running in the background, is halfway through and then suddenly...i dunno, the battery goes on the netbook, or a kid turns the machine off. Does it compare the folders when checking ifexist? Im just thinking, if the folder is there but half the files are missing what does it do?
sted Posted September 27, 2012 Posted September 27, 2012 Ok, heres a question. Say the script is running in the background, is halfway through and then suddenly...i dunno, the battery goes on the netbook, or a kid turns the machine off. Does it compare the folders when checking ifexist? Im just thinking, if the folder is there but half the files are missing what does it do? depends if the file you check for is copied first or last
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now