Jump to content

szot

Member
  • Posts

    3
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Switzerland

Everything posted by szot

  1. Think I solved it. I used your solution of inputbox because it looks much more elaborated than my tries and what I needed was: Set fs = CreateObject("Scripting.FileSystemObject") strFileName = fs.BuildPath(Wscript.ScriptFullName & "\..", "start.bat") strFileName = fs.GetAbsolutePathName(strFileName) Set ts = fs.OpenTextFile(strFileName, 2, True) ts.WriteLine "@echo off" ts.WriteLine "" ts.WriteLine "for /F " & """tokens=1-4 delims=/- """ & " %%A in ('date/T') do md " & A1 & "\%%A%%B%%C" ts.WriteLine "cls" ts.WriteLine "exit" ts.Close So this part where I had to make it write the batch file and it had among others "-marks which I could not parse through. Thank you so much for your help again!! Deana
  2. Thank you gunsmokingman! The codes look fabulous and way better than what I was trying so far but my main problem is not to just get the input from the user, but that I need this input to be written into a batch file into the middle of a lot of text with special characters. With other words the vbs script would have to create the main .bat file that I use with the code I wrote, so literally call the batch file writing the lines but with the path that it got from the user. This would start a chain of batch-es running, that will do a lot of data manipulation but this initial one I need to run. I have to resort to this because we are talking about hundreds of batch-es already created. So if the vbs gets the USERINPUT (I tried so far with strUserIn = InputBox, by far not as nice as yours, many thanx again) then it needs to write the text: @echo off for /F "tokens=1-4 delims=/- " %%A in ('date/T') do md USERINPUT\%%A%%B%%C for /F "tokens=1-4 delims=/- " %%A in ('date/T') do move USERINPUT\*.* c:\usergiven\%%A%%B%%C cls exit and save it as start.bat As you can see the batch file holds a lot of special characters, so don't know how to parse it in there. I treid strFileName = fs.BuildPath(Wscript.ScriptFullName & "\..", "start.bat") however the USERINPUT\%%A%%B%%C part I don't know how to do, aka how do I write the userinput and after that the special characters %%A etc. Many thanx again Deana
  3. Hello! I need a gui to ask the user to give in a chosen path and with that path build a batch file containing this: @echo off for /F "tokens=1-4 delims=/- " %%A in ('date/T') do md c:\usergiven\%%A%%B%%C for /F "tokens=1-4 delims=/- " %%A in ('date/T') do move c:\usergiven\*.* c:\usergiven\%%A%%B%%C cls exit Would this be possible via vbs or anything very basic that does not require the user to install any suits or applications? Needs to be editable for future changes of parameters. Many thanx for any help and pointers, am totally new to this. Deana
×
×
  • Create New...