"Christmas - the time to fix the computers of your loved ones" « Lord Wyrm

Verknüpfungspfad ändern

salsa 21.11.2005 - 15:15 1401 17
Posts

T3XT4

Beißer
Registered: Jan 2003
Location: .
Posts: 3794
So, auf die Gache noch hingemurkst..
thx an mephisto und that

Code:
// JScript.

folder = "C:\\favliste"

fso = new ActiveXObject("Scripting.FileSystemObject"); 

fold = fso.getFolder(folder);

Shell = new ActiveXObject("WScript.Shell");

for (var enumerator = new Enumerator(fold.files) ; !enumerator.atEnd(); enumerator.moveNext())
{ 
   file1  = enumerator.item();     

link = Shell.CreateShortcut(file1) ;


y = link.TargetPath;

x = y.substring(1,y.length);

z = "Y" + x; 

link.TargetPath =  z;

link.Save();

fold = "";

}

Keine Garantien :)

(btw: das for each (vbs) und for in (js) ned dasselbe is is auch gemein :D)

salsa

So spät wie gestern.
Avatar
Registered: Oct 2003
Location: Bonner Exil #2
Posts: 5279
Danke T3XT4, great work, genau so hab ich mir das gedacht :)

Aber that, wie ich das selbst mit Hilfe eines "kleinen scripts" hinbekommen hätte leuchtet mir nicht ein - trotzdem, danke für die Mithilfe :)

Gstar

Banned by Moderators
Registered: Mar 2006
Location: Udssr
Posts: 3
Interessiert keine Sau....
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz