tosca925 Posted March 28, 2006 Posted March 28, 2006 I need a request for a script similar to my last one. I need this script to look for a folder in c:\windows\system32\foldername. If this folder exists then i want the script to stop. If the folder does not exist then i want the script to run a .exe file from the server toinstall a piece of software. ie \\servername\folder\software.exe. There will be file sin the folder in c:\windows\system32\foldername but i only wnat it to look at the folder not its contents. Any suggestions please.?
Norphy Posted March 28, 2006 Posted March 28, 2006 if exist "C:\windows\system32\foldername" goto end \\servername\folder\software.exe :end Should do it
ChrisH Posted March 28, 2006 Posted March 28, 2006 Yes put it in a bat or cmd file. I couldnt be doing without my scripting skills these days it saves you so much time and manual effort it's well worth putting the time in to learn
tosca925 Posted March 28, 2006 Author Posted March 28, 2006 @ChrisH I'd love to learn Chris, have you any recomendations for me to start as a beginner? Books or web sites? I need basic on all sorts of scripting. I have lots of very useful scripts but i have only experience of tweaking other peoples scripts. lol
Ric_ Posted March 28, 2006 Posted March 28, 2006 @tosca925: Check out the Scripting Centre over at http://www.technet.com - IMHO the best place to start learning. Lots of examples and you can download a help file with the vast majority of the functions that you need - copy and paste and hack to begin with and eventually you'll be able to start from scratch (when necessary).
ChrisH Posted March 28, 2006 Posted March 28, 2006 Theres a few resources listed in the scripting forum as well here
SpuffMonkey Posted March 29, 2006 Posted March 29, 2006 I found Steve Rochford's Scripting 101 course that he gave at the Edugeek conference extremely useful - don't know if he'd be willing to let you have a copy?
mac_shinobi Posted December 19, 2006 Posted December 19, 2006 any chance I could get a copy of that, after all it is christmas ? LOL
GrumbleDook Posted December 19, 2006 Posted December 19, 2006 Resources are still available on the conference website.
mac_shinobi Posted December 20, 2006 Posted December 20, 2006 const Folder_Path = "c:\windows\system32\foldername" const Exe = "\\servername\folder\software.exe" Set FSO = CreateObject("Scripting.FileSystemObject") Set WshShell = CreateObject("WScript.Shell") If FSO.FolderExists(Folder_Path) = true then Wscript.Quit Else WshShell.Run Exe EndIf
nickje Posted December 20, 2006 Posted December 20, 2006 Resources are still available on the conference website. http://www.edugeekconference.net/index.php?option=com_content&task=section&id=7&Itemid=59 Is that where the resources are? I cannae see them!
GrumbleDook Posted December 20, 2006 Posted December 20, 2006 Apologies ... most of the first conference is still held on the Wiki ... a direct link to the 2005 conference is here and the scripting resources are here
SimpleSi Posted December 20, 2006 Posted December 20, 2006 @tosca925 I've found AutoIt very simple to get into and I also use WPkg to deploy some applications and it has inbuilt folder/file checking to decide whether to isntall software or not. regards Simon
PiqueABoo Posted December 20, 2006 Posted December 20, 2006 const Folder_Path = "c:\windows\system32\foldername" Less is more.. if you can do it with one line of batch file then that's usually the way to go. I'd do the one above, but with a "not": if not exist
mac_shinobi Posted December 20, 2006 Posted December 20, 2006 its just the scripts section , asker didnt specify batch, vb script, javascript or what , so I just thought id put a vbscript together
kenchisho Posted March 18, 2010 Posted March 18, 2010 (edited) hey guys... i need help writing a script to convert files from raw to wav. I am using a tool named raw2wav.exe to convert/merge 2-file/2-way audio into a single wav file. The utility automaticly checks to see if files exist in the destination directory and does not convert them... c:\ cd c:\program files\cisco\desktop\bin for %%c in (..\..\desktop_audio\*.raw) do raw2wav "%%~nc%%~xc" is there a way to add to this batch so the tool converts only files that have a create date of today? just to mention... the file names of the raw files containt a timestamp in the and the naming is: .To/From.raw Edited March 18, 2010 by kenchisho
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