ik ben opzoek naar een programma die bestanden die ouder zijn dan 'x' aantal dagen verplaatst, en verwijderd van de plek waar de bestanden stonden.
bijvoorbaat dank!!
Daniel
bijvoorbaat dank!!
Daniel
1
| man crontab |
The whole problem with the world is that fools and fanatics are always so certain of themselves, and wiser people so full of doubts. -- Bertrand Russell
het kopieren gaat van een windows server 2003 systeem naar, of een dvd of een externe harde schijf. we hadden een programma gevonden namelijk delenda maar dat werkte niet.IorGie schreef op woensdag 12 maart 2008 @ 14:54:
code:
1 man crontab
MAW als je niet verteld welk besuringssysteem je hebt weten we niks. Tevens is het handig om te vertellen wat je reeds geprobeerd hebt.
[ Voor 9% gewijzigd door Big Womly op 12-03-2008 15:13 ]
When you talk to God it's called prayer, but when God talks to you it's called schizophrenia
Verwijderd
[ Voor 33% gewijzigd door Verwijderd op 12-03-2008 15:07 ]
heb aardig lang gegoogled maar 'nog' niks gevonden. vandaar dat ik het op dit forum vraag.Verwijderd schreef op woensdag 12 maart 2008 @ 15:06:
daar moet vast wel iets voor te vinden...ik weet zkr dat als je gaat googlen wel iets kunt vinden..
mbsaerens was iets sneller...
Je hoeft niet altijd een appl. te hebben een scriptje is al zat..
Verwijderd
na nog even op google te hebben gezocht kwam ik bij een forum met waar een vb script stond voor het verplaatsen van bestanden na een x aantal uur/dagen.Verwijderd schreef op woensdag 12 maart 2008 @ 16:37:
hoe? en wat is de uitkomst?
Misschien wel interessant voor de mede tweakers...
Wel zo collegiaal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
| Option Explicit
On Error Resume Next
Dim fso, FileSet, Path, File, DDiff, Date1, Date2, DestPath
Path = "pad"
DestPath = "pad"
'DestPath must end with \
FileSet = GetDirContents(Path)
For each File in FileSet
Set File = fso.GetFile(Path & "\" & File)
Date1 = File.DateLastModified
'.DateCreated if you want 24hrs of life, this example is 24hrs since last written
Date2 = Now()
DDiff = Abs(DateDiff("h", Date1, Date2))
If DDiff >= 24 Then
If Not fso.FileExists(DestPath & File.Name) Then
File.Move DestPath
'wscript.echo File.Name
Else
wscript.echo "Unable to move file [" & File.Name & "]. A file by this name already exists in the target directory."
End If
End If
Next
Function GetDirContents(FolderPath)
Dim FileCollection, aTmp(), i
Set fso = CreateObject("Scripting.FileSystemObject")
Set FileCollection = fso.GetFolder(FolderPath).Files
Redim aTmp(FileCollection.count - 1)
i = -1
For Each File in FileCollection
i = i + 1
aTmp(i) = File.Name
Next
GetDirContents = aTmp
End Function |
ik heb een 864 GB floppydrive! - certified prutser - the social skills of a thermonuclear device
Uitbreiden naar mappen lijkt me niet moeilijk. Zet de code die niet in een functie staat in een functie met als parameter welke map je wil verplaatsen en roep deze recursief op.probleem met dit script is dat hij alleen bestanden verplaatst en geen mappen, nog even zoeken dus.
[ Voor 70% gewijzigd door Big Womly op 21-03-2008 09:38 ]
When you talk to God it's called prayer, but when God talks to you it's called schizophrenia
Apple iPhone 17 LG OLED evo G5 Google Pixel 10 Samsung Galaxy S25 Star Wars: Outlaws Nintendo Switch 2 Apple AirPods Pro (2e generatie) Sony PlayStation 5 Pro
Tweakers is onderdeel van
DPG Media B.V.
Alle rechten voorbehouden - Auteursrecht © 1998 - 2025
•
Hosting door TrueFullstaq