|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Special batchfileHello,
Who can make a batchfile with de following tasks:
- A program on my computer will open the batchfile
- The batchfile wil sleep "X" seconds
- After sleeping the batchfile will rename a other file that stay in
the same map of de batchfile.
De name of that file must be: movie_1_YYYYMMDD_HHMMSS.wmv
YYYYMMDD refert to de date of the moment that de batchfile is running
HHMMSS refert to de time of the moment that de batchfile is running
(Example: When i run the batch file on 2008-12-16 and on time 16:02:57,
the name of the file that must be renamed is:
movie_1_20081206_160257.wmv and must be renamed in movie.wmv)
De file must be renamed to "movie.wmv".
After renaming the fill must be uploaded with a FTP script
And after uploading the file must be deleting in de local folder (NOT!
on the ftp server).
After deleting, the batch is finish.
So who can make some script? :-)
Steven
--
stevenjansen
------------------------------------------------------------------------
stevenjansen's Profile: http://forums.techarena.in/members/stevenjansen.htm
View this thread: http://forums.techarena.in/server-scripting/1088584.htmhttp://forums.techarena.in
Show quote
Hide quote
"stevenjansen" <stevenjansen.3kiozc@DoNotSpam.com> wrote in message You probably need to think a little harder about your requirements. In your news:stevenjansen.3kiozc@DoNotSpam.com... > > Hello, > > Who can make a batchfile with de following tasks: > > - A program on my computer will open the batchfile > - The batchfile wil sleep "X" seconds > - After sleeping the batchfile will rename a other file that stay in > the same map of de batchfile. > > De name of that file must be: movie_1_YYYYMMDD_HHMMSS.wmv > YYYYMMDD refert to de date of the moment that de batchfile is running > HHMMSS refert to de time of the moment that de batchfile is running > > (Example: When i run the batch file on 2008-12-16 and on time 16:02:57, > the name of the file that must be renamed is: > movie_1_20081206_160257.wmv and must be renamed in movie.wmv) > > De file must be renamed to "movie.wmv". > After renaming the fill must be uploaded with a FTP script > And after uploading the file must be deleting in de local folder (NOT! > on the ftp server). > > After deleting, the batch is finish. > > So who can make some script? :-) > > > > Steven example you write ========== (Example: When i run the batch file on 2008-12-16 and on time 16:02:57, the name of the file that must be renamed is: movie_1_20081206_160257.wmv and must be renamed in movie.wmv) ========== In other words, you expect the batch file to do this: ren movie_1_20081206_160257.wmv movie.mwv This requirement will cause many failures because it is quite likely that the "seconds" have ticked over to the next number by the time the batch file runs. Putting it another way, your file name might be movie_1_20081206_160257.wmv but it might well be 16:02:58 at the time the batch file runs. It might even be much later if the system is very busy, e.g. with a virus scanner pattern file update or with an Automatic Windows Update. OK, i'm sorry, My English is very bat. But I think what you mean.
Maybe is this possible idea: A program on my computer will open the batchfile The batchfile wil sleep "X" seconds After sleep "X" seconds, the batchfile will rename a file that is on the last time modified. With other words; A file that is last modified will rename by the batch file in "movie.exe". Than the file will be uploaded bij a ftp and after that de local file will be deleted. -- stevenjansen ------------------------------------------------------------------------ stevenjansen's Profile: http://forums.techarena.in/members/stevenjansen.htm View this thread: http://forums.techarena.in/server-scripting/1088584.htmhttp://forums.techarena.in You could use something like this:
@echo off set Source=d:\Movie Files set script=c:\script.scr set site=ftp.jansen.com set user=steven set password=SomePassword for /F "delims=" %%a in ('dir /b /od "%Source%"') do set name=%%a if exist "%Source%\movie.mwv" del "%Source%\movie.mwv" ren "%Source%\%name%" movie.mwv echo> %script% %user% echo>>%script% %password% echo>>%script% binary echo>>%script% put "%name%" echo>>%script% quit ftp -s:%Script% %site% del %script% del "%Source%\movie.mwv" Show quoteHide quote "stevenjansen" <stevenjansen.3kiujb@DoNotSpam.com> wrote in message news:stevenjansen.3kiujb@DoNotSpam.com... > > OK, i'm sorry, My English is very bat. But I think what you mean. > Maybe is this possible idea: > > A program on my computer will open the batchfile > The batchfile wil sleep "X" seconds > After sleep "X" seconds, the batchfile will rename a file that is on > the last time modified. > > With other words; A file that is last modified will rename by the batch > file in "movie.exe". > Than the file will be uploaded bij a ftp and after that de local file > will be deleted. > > > -- > stevenjansen > ------------------------------------------------------------------------ > stevenjansen's Profile: > http://forums.techarena.in/members/stevenjansen.htm > View this thread: http://forums.techarena.in/server-scripting/1088584.htm > > http://forums.techarena.in > Ok super, thank you!
I've copy the complete script in Notepad and save the file in de folder "C:\test\script.bat". I see: "set script=c:\script.scr" Could you tell what the file "script.scr" is? -- stevenjansen ------------------------------------------------------------------------ stevenjansen's Profile: http://forums.techarena.in/members/stevenjansen.htm View this thread: http://forums.techarena.in/server-scripting/1088584.htmhttp://forums.techarena.in
Show quote
Hide quote
"stevenjansen" <stevenjansen.3kk5rc@DoNotSpam.com> wrote in message Script.scr is a script file containing a number of commands that are news:stevenjansen.3kk5rc@DoNotSpam.com... > > Ok super, thank you! > I've copy the complete script in Notepad and save the file in de folder > "C:\test\script.bat". > > I see: "set script=c:\script.scr" > Could you tell what the file "script.scr" is? > -- > stevenjansen > ------------------------------------------------------------------------ > stevenjansen's Profile: > http://forums.techarena.in/members/stevenjansen.htm > View this thread: http://forums.techarena.in/server-scripting/1088584.htm > > http://forums.techarena.in meaningful for ftp.exe. It gets generated each time you run the batch file. If you prefer then you can call it stevenjansen.xyz . . . Thank you! It's works perfectly.
--
stevenjansen
------------------------------------------------------------------------
stevenjansen's Profile: http://forums.techarena.in/members/stevenjansen.htm
View this thread: http://forums.techarena.in/server-scripting/1088584.htmhttp://forums.techarena.in
Thanks for the feedback.
Show quoteHide quote "stevenjansen" <stevenjansen.3kkbbc@DoNotSpam.com> wrote in message news:stevenjansen.3kkbbc@DoNotSpam.com... > > Thank you! It's works perfectly. > > > -- > stevenjansen
Is there any way to control the Transport Server (subcomponent of Windows Deployment Services) via P
How can I do a WMI Bulk data retrieval ? DISKPART select command doesn't have a "noerr" command for scripti Net send over different domains Problem calling oADsSecurityUtility.SetSecurityDescriptor from VBScript Monitor Folder Recursively using WMI exporting * importing users into groups script to extract and create contacts How to Modify AD CN Field can I do this from answer file or do I need to script post install? |
|||||||||||||||||||||||