|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello,
I am trying to script something to creat a folder with the time and date inthe name and then copy files into it. I have a set of files i want copies of every hour. Due to the way the app was created the files do not appear to change since they take a certain size to satrt and then data is appended to them so the size does nto change. Backup sees that they didnt change so doesnt back them up again. Any would be apreciated. I have found an applicaiton to create the folder with the time and date, but i cant figure out how to copy into that folder dynamically. I need to bring the name of the folder created by the app into a copy command. I can redirect the output of the create into a txt file but how do I read from that to copy into the folder. Thanks Jim |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
"Jim Kiddoo" <jim.kiddoo@headcount.com> wrote in message news:64B9FAD6-6509-4D7E-9F4A-97BDFEEA9EAA@microsoft.com... > Hello, > I am trying to script something to creat a folder with the time and date > inthe name and then copy files into it. I have a set of files i want > copies of every hour. Due to the way the app was created the files do not > appear to change since they take a certain size to satrt and then data is > appended to them so the size does nto change. Backup sees that they didnt > change so doesnt back them up again. > > Any would be apreciated. I have found an applicaiton to create the > folder with the time and date, but i cant figure out how to copy into that > folder dynamically. I need to bring the name of the folder created by the > app into a copy command. I can redirect the output of the create into a > txt file but how do I read from that to copy into the folder. > Thanks > Jim What you require is not hard to achieve but you need to give a detailed example to illustrate your needs. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
I need to copy around 50 files into a new directory that is stamped with the
current time and date. This needs to be scheduled through the scheduler, so it has to be scripted to run hourly. so every hour a new folder is created with a new name and all the files from the main directory are copied into it. This needs to happen every hour with a unique folder name every time. Thanks for any . Jim "Pegasus (MVP)" <I.can@fly.com> wrote in message news:OsW8IZfNIHA.5988@TK2MSFTNGP02.phx.gbl... > > "Jim Kiddoo" <jim.kiddoo@headcount.com> wrote in message > news:64B9FAD6-6509-4D7E-9F4A-97BDFEEA9EAA@microsoft.com... >> Hello, >> I am trying to script something to creat a folder with the time and date >> inthe name and then copy files into it. I have a set of files i want >> copies of every hour. Due to the way the app was created the files do not >> appear to change since they take a certain size to satrt and then data is >> appended to them so the size does nto change. Backup sees that they didnt >> change so doesnt back them up again. >> >> Any would be apreciated. I have found an applicaiton to create the >> folder with the time and date, but i cant figure out how to copy into >> that folder dynamically. I need to bring the name of the folder created >> by the app into a copy command. I can redirect the output of the create >> into a txt file but how do I read from that to copy into the folder. >> Thanks >> Jim > > What you require is not hard to achieve but you need to give > a detailed example to illustrate your needs. > |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Try this:
@echo off set T=%time:~0,5% set dir=%date:/=-% %T::=-% echo The target folder is "%dir%". xcopy /s /c /y "E:\Main Directory\*.*" "D:\Backup\%dir%\" "Jim Kiddoo" <jim.kiddoo@headcount.com> wrote in message news:88BCFCB0-FC70-4278-A18D-931497B126DA@microsoft.com... >I need to copy around 50 files into a new directory that is stamped with >the current time and date. This needs to be scheduled through the >scheduler, so it has to be scripted to run hourly. > > so every hour a new folder is created with a new name and all the files > from the main directory are copied into it. This needs to happen every > hour with a unique folder name every time. > > Thanks for any . > Jim > > > "Pegasus (MVP)" <I.can@fly.com> wrote in message > news:OsW8IZfNIHA.5988@TK2MSFTNGP02.phx.gbl... >> >> "Jim Kiddoo" <jim.kiddoo@headcount.com> wrote in message >> news:64B9FAD6-6509-4D7E-9F4A-97BDFEEA9EAA@microsoft.com... >>> Hello, >>> I am trying to script something to creat a folder with the time and date >>> inthe name and then copy files into it. I have a set of files i want >>> copies of every hour. Due to the way the app was created the files do >>> not appear to change since they take a certain size to satrt and then >>> data is appended to them so the size does nto change. Backup sees that >>> they didnt change so doesnt back them up again. >>> >>> Any would be apreciated. I have found an applicaiton to create the >>> folder with the time and date, but i cant figure out how to copy into >>> that folder dynamically. I need to bring the name of the folder created >>> by the app into a copy command. I can redirect the output of the create >>> into a txt file but how do I read from that to copy into the folder. >>> Thanks >>> Jim >> >> What you require is not hard to achieve but you need to give >> a detailed example to illustrate your needs. >> > |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
That works Perfectly, thank you very much.
Jim "Pegasus (MVP)" <I.can@fly.com> wrote in message news:ufjaztkNIHA.5988@TK2MSFTNGP02.phx.gbl... > Try this: > > @echo off > set T=%time:~0,5% > set dir=%date:/=-% %T::=-% > echo The target folder is "%dir%". > xcopy /s /c /y "E:\Main Directory\*.*" "D:\Backup\%dir%\" > > > "Jim Kiddoo" <jim.kiddoo@headcount.com> wrote in message > news:88BCFCB0-FC70-4278-A18D-931497B126DA@microsoft.com... >>I need to copy around 50 files into a new directory that is stamped with >>the current time and date. This needs to be scheduled through the >>scheduler, so it has to be scripted to run hourly. >> >> so every hour a new folder is created with a new name and all the files >> from the main directory are copied into it. This needs to happen every >> hour with a unique folder name every time. >> >> Thanks for any . >> Jim >> >> >> "Pegasus (MVP)" <I.can@fly.com> wrote in message >> news:OsW8IZfNIHA.5988@TK2MSFTNGP02.phx.gbl... >>> >>> "Jim Kiddoo" <jim.kiddoo@headcount.com> wrote in message >>> news:64B9FAD6-6509-4D7E-9F4A-97BDFEEA9EAA@microsoft.com... >>>> Hello, >>>> I am trying to script something to creat a folder with the time and >>>> date inthe name and then copy files into it. I have a set of files i >>>> want copies of every hour. Due to the way the app was created the files >>>> do not appear to change since they take a certain size to satrt and >>>> then data is appended to them so the size does nto change. Backup sees >>>> that they didnt change so doesnt back them up again. >>>> >>>> Any would be apreciated. I have found an applicaiton to create the >>>> folder with the time and date, but i cant figure out how to copy into >>>> that folder dynamically. I need to bring the name of the folder created >>>> by the app into a copy command. I can redirect the output of the create >>>> into a txt file but how do I read from that to copy into the folder. >>>> Thanks >>>> Jim >>> >>> What you require is not hard to achieve but you need to give >>> a detailed example to illustrate your needs. >>> >> > > |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Thanks for the feedback.
"Jim Kiddoo" <jim.kiddoo@headcount.com> wrote in message news:F377DED3-A79C-4B98-AFE7-AEC2A84E1D98@microsoft.com... > That works Perfectly, thank you very much. > > Jim > "Pegasus (MVP)" <I.can@fly.com> wrote in message > news:ufjaztkNIHA.5988@TK2MSFTNGP02.phx.gbl... >> Try this: >> >> @echo off >> set T=%time:~0,5% >> set dir=%date:/=-% %T::=-% >> echo The target folder is "%dir%". >> xcopy /s /c /y "E:\Main Directory\*.*" "D:\Backup\%dir%\" >> >> >> "Jim Kiddoo" <jim.kiddoo@headcount.com> wrote in message >> news:88BCFCB0-FC70-4278-A18D-931497B126DA@microsoft.com... >>>I need to copy around 50 files into a new directory that is stamped with >>>the current time and date. This needs to be scheduled through the >>>scheduler, so it has to be scripted to run hourly. >>> >>> so every hour a new folder is created with a new name and all the files >>> from the main directory are copied into it. This needs to happen every >>> hour with a unique folder name every time. >>> >>> Thanks for any . >>> Jim >>> >>> >>> "Pegasus (MVP)" <I.can@fly.com> wrote in message >>> news:OsW8IZfNIHA.5988@TK2MSFTNGP02.phx.gbl... >>>> >>>> "Jim Kiddoo" <jim.kiddoo@headcount.com> wrote in message >>>> news:64B9FAD6-6509-4D7E-9F4A-97BDFEEA9EAA@microsoft.com... >>>>> Hello, >>>>> I am trying to script something to creat a folder with the time and >>>>> date inthe name and then copy files into it. I have a set of files i >>>>> want copies of every hour. Due to the way the app was created the >>>>> files do not appear to change since they take a certain size to satrt >>>>> and then data is appended to them so the size does nto change. Backup >>>>> sees that they didnt change so doesnt back them up again. >>>>> >>>>> Any would be apreciated. I have found an applicaiton to create >>>>> the folder with the time and date, but i cant figure out how to copy >>>>> into that folder dynamically. I need to bring the name of the folder >>>>> created by the app into a copy command. I can redirect the output of >>>>> the create into a txt file but how do I read from that to copy into >>>>> the folder. >>>>> Thanks >>>>> Jim >>>> >>>> What you require is not hard to achieve but you need to give >>>> a detailed example to illustrate your needs. >>>> >>> >> >> > |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
My DOS actually gives the Day also as the output
like Tue 12/18/2007 How can I filter only the date from the output? I do not need the day, |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
<ajayts1980@gmail.com> wrote in message news:888f891b-6dbe-4677-8b67-6b4592d40374@e10g2000prf.googlegroups.com... > My DOS actually gives the Day also as the output > like Tue 12/18/2007 > > How can I filter only the date from the output? I do not need the day, It is not possible to filter out the day under DOS. However, you can remove it in a Command Prompt under Win2000/XP: set MyDate=%date:~4% echo Date=%MyDate% |
|
![]() |
| Outils de la discussion | |
|
|