Shortcut Batchfile
Ich hab hier ein Batchfile das Shortcuts per VBScript erstellen soll. Leider funktionierts nicht so recht und ich kann mir nicht erklären warum. Findet wer den Fehler?
@echo off
cd C:\projekte\
set mydate=%date:~6,4%_%date:~3,2%_%date:~0,2%
for /D %%f in (Status_Projekte*) do rmdir %%f /s /q
MKDIR C:\projekte\Status_Projekte_%mydate%\1.unbearbeitet\
MKDIR C:\projekte\Status_Projekte_%mydate%\2.gestoppt\
MKDIR C:\projekte\Status_Projekte_%mydate%\3.spek_nicht_frei\
MKDIR C:\projekte\Status_Projekte_%mydate%\4.in_entwicklung\
MKDIR C:\projekte\Status_Projekte_%mydate%\5.zur_verif_valid\
MKDIR C:\projekte\Status_Projekte_%mydate%\6.erledigt\
MKDIR C:\projekte\Status_Projekte_%mydate%\7.pausiert\
cd C:\projekte\99_projekte\
for /D %%a in ("C:\projekte\99_projekte\*") DO @(
cd %%~na
if EXIST 1.unbearbeitet.stat cd C:\projekte\Status_Projekte_%mydate%\1.unbearbeitet\
if EXIST 2.gestoppt.stat cd C:\projekte\Status_Projekte_%mydate%\2.gestoppt\
if EXIST 3.spek_nicht_frei.stat cd C:\projekte\Status_Projekte_%mydate%\3.spek_nicht_frei\
if EXIST 4.in_entwicklung.stat cd C:\projekte\Status_Projekte_%mydate%\4.in_entwicklung\
if EXIST 5.zur_verif_valid.stat cd C:\projekte\Status_Projekte_%mydate%\5.zur_verif_valid\
if EXIST 6.erledigt.stat cd C:\projekte\Status_Projekte_%mydate%\6.erledigt\
if EXIST 7.pausiert.stat cd C:\projekte\Status_Projekte_%mydate%\7.pausiert\
Set oWS = WScript.CreateObject("WScript.Shell")
Set oLink = oWS.CreateShortcut("%%~na.LNK")
oLink.TargetPath = %%a
oLink.Save
cd C:\projekte\99_projekte\
)
Please also mark the comments that contributed to the solution of the article
Kommentar vom Moderator Dani am Feb 27, 2015 um 16:29:20 Uhr
Formatierung hinzugefügt.
Content-Key: 264766
Url: https://administrator.de/contentid/264766
Printed on: April 19, 2024 at 01:04 o'clock
1 Comment