balubeto Posted June 20, 2009 Posted June 20, 2009 HIShould I create a list of n subdirectory known and I should run some commands in any other subdirectory of the same branch. How do I write this cmd script so I can write from the command prompt "script-name directory subdirectory1 subdirectory2 subdirectory3 ... subdirectoryn" ?THANKSBYE
uid0 Posted June 20, 2009 Posted June 20, 2009 is this still ?http://www.msfn.org/board/index.php?showto...mp;#entry862635http://www.911cd.net/forums//index.php?showtopic=23072There is no safe delete list - if it's not your pc you don't know what might be in those folders, or even if the "users" folder has been renamed.
Yzöwl Posted June 20, 2009 Posted June 20, 2009 Okay, before this topic gets as 'out of control' as your others, referenced above, I'll toss you a life line.Explain once only, fully and in good English, exactly what it is you want someone to do for you.In order to do this all pertinent information must be provided. This information will include, but will not be limited to, what you have so far, full file structures with real names as applicable, operating system(s) etc.If you are capable of doing that then you will be aided in your goal, otherwise I can only see a re-occurring pattern!
jaclaz Posted June 20, 2009 Posted June 20, 2009 Okay, before this topic gets as 'out of control' as your others, referenced above, I'll toss you a life line.If I may , it should be "as 'out of control' as your others, referenced above, AND your others, of which just a few are referenced below:"http://www.p2pforum.it/forum/showthread.php?t=386368http://forum.html.it/forum/showthread.php?...hreadid=1339895http://forum.html.it/forum/showthread.php?...hreadid=1340071http://www.appdeploy.com/messageboards/tm.asp?m=49253http://www.megalab.it/forum/programmazione...ute-t54232.htmlhttp://www.sysadmin.it/Forum/tabid/57/afv/...IT/Default.aspxhttp://www.sysadmin.it/Forum/tabid/57/afv/...IT/Default.aspxhttp://www.ilsoftware.it/forum/viewtopic.p...=33&t=76032http://forum.html.it/forum/showthread.php?...hreadid=1338022http://www.appdeploy.com/messageboards/tm.asp?m=49374jaclaz
gunsmokingman Posted June 20, 2009 Posted June 20, 2009 Since I am having troubles understanding what you want to do, it sounds like you want a script to go threwall the sub folders in the parent folder. Try this VBS script it will list the contents of all the sub folders in theparent folder. This will saved all the information in a text file in the parent folder.Save as ListSubFolder.vbs Dim Fso :Set Fso = CreateObject("Scripting.FileSystemObject") Dim Dir :Dir = "." Dim Path, Ts Path = Fso.GetParentFolderName(WScript.ScriptFullName) & "\DirectoryFolderList.txt" Set Ts = Fso.CreateTextFile(Path) Ts.WriteLine "Start Time : " & Now & vbCrLf Ts.WriteLine "Start Folder : " & Replace(WScript.ScriptFullName,WScript.ScriptName,"") Recursive Fso.GetFolder(Dir) Ts.Close CreateObject("Wscript.Shell").Run("notepad.exe " & Chr(34) & Path & Chr(34)),1,True'-> Searches Threw The Parent Folder And All Sub Folders Function Recursive(Folder) Dim Col '-> Collect All The Files In Each Folder For Each Col In Folder.Files Ts.WriteLine Col.Name Next Ts.WriteBlankLines(1) Dim Obj For Each Obj In Folder.subFolders Ts.WriteLine Obj.Path Recursive Obj Next End Function
balubeto Posted June 21, 2009 Author Posted June 21, 2009 Since I am having troubles understanding what you want to do, it sounds like you want a script to go threwall the sub folders in the parent folder. Try this VBS script it will list the contents of all the sub folders in theparent folder. This will saved all the information in a text file in the parent folder.Save as ListSubFolder.vbs Dim Fso :Set Fso = CreateObject("Scripting.FileSystemObject") Dim Dir :Dir = "." Dim Path, Ts Path = Fso.GetParentFolderName(WScript.ScriptFullName) & "\DirectoryFolderList.txt" Set Ts = Fso.CreateTextFile(Path) Ts.WriteLine "Start Time : " & Now & vbCrLf Ts.WriteLine "Start Folder : " & Replace(WScript.ScriptFullName,WScript.ScriptName,"") Recursive Fso.GetFolder(Dir) Ts.Close CreateObject("Wscript.Shell").Run("notepad.exe " & Chr(34) & Path & Chr(34)),1,True'-> Searches Threw The Parent Folder And All Sub Folders Function Recursive(Folder) Dim Col '-> Collect All The Files In Each Folder For Each Col In Folder.Files Ts.WriteLine Col.Name Next Ts.WriteBlankLines(1) Dim Obj For Each Obj In Folder.subFolders Ts.WriteLine Obj.Path Recursive Obj Next End FunctionIn other words, if I have the structure: Folder1 --- SubFolder1 --- SubFolder2 --- SubFolder3 --- SubFolder4 I would need to write, from the command line: "delete-script / Folder1 / SubFolder1 / SubFolder2" and, therefore, the resulting structure should be: Folder1 - --- SubFolder1 --- SubFolder2 Then, your script does this? If no, please, you can modify this script?THANKSBYE
Yzöwl Posted June 21, 2009 Posted June 21, 2009 I tossed you a life line and you appear to have tossed it back, topic closed!
Recommended Posts