Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Windows XP

Windows XP Discuss the Microsoft Windows XP Operating System

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 10-28-2009, 02:10 AM
Ahmed
Newsgroup Contributor
 
Posts: n/a
Windows cannot copy file. The filename or extension is too long

hey
we are having this new problem in our labs that windows create the mandatory
profile which is located locally in the same workstation becouse there is a
file thats too long in the temporary internet files. the profile should be
deleted on log off but it does not for a reason that i dont know or becouse
it is locked. i tried using the UPHclean up "both the old the new and the
beta" and it didnt work. i tried to put a log off script to delete the
profile but it works only when we log in as admin. this problem is killing
me. any help will be appriciated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 10-28-2009, 02:10 AM
  #2 (permalink)  
Old 10-28-2009, 05:40 AM
smlunatick
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too long

On Oct 28, 10:03*am, Ahmed <Ah...@discussions.microsoft.com> wrote:
> hey
> we are having this new problem in our labs that windows create the mandatory
> profile which is located locally in the same workstation becouse there isa
> file thats too long in the temporary internet files. the profile should be
> deleted on log off but it does not for a reason that i dont know or becouse
> it is locked. i tried using the UPHclean up "both the old the new and the
> beta" and it didnt work. i tried to put a log off script to delete the
> profile but it works only when we log in as admin. this problem is killing
> me. any help will be appriciated.


What is the filename? There is a filename size limt.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 10-28-2009, 08:30 AM
Pegasus [MVP]
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too long


"Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
news:15FC0B5D-223B-4CDA-A1AB-70CB0013F1CA@microsoft.com...
> hey
> we are having this new problem in our labs that windows create the
> mandatory
> profile which is located locally in the same workstation becouse there is
> a
> file thats too long in the temporary internet files. the profile should be
> deleted on log off but it does not for a reason that i dont know or
> becouse
> it is locked. i tried using the UPHclean up "both the old the new and the
> beta" and it didnt work. i tried to put a log off script to delete the
> profile but it works only when we log in as admin. this problem is killing
> me. any help will be appriciated.


I would rename the file with the exessively long name.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 10-29-2009, 02:40 AM
Ahmed
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too lon

hey
sorry for not answering fast coz i thought i would get an e mail when
someone answers but i didnt. any way it does not matter what the file name is
coz even if i delete it when any other user logs in and get to the same web
site it will come back and we get the same problem. now you will ask which
website and i will say there are many web site that will leave some jpg files
with a very long file names. and i have 5 labs with 20 computer in each so it
is impossible to log in every computer and delete the temparory internet
files or delete the profile.

"smlunatick" wrote:

> On Oct 28, 10:03 am, Ahmed <Ah...@discussions.microsoft.com> wrote:
> > hey
> > we are having this new problem in our labs that windows create the mandatory
> > profile which is located locally in the same workstation becouse there is a
> > file thats too long in the temporary internet files. the profile should be
> > deleted on log off but it does not for a reason that i dont know or becouse
> > it is locked. i tried using the UPHclean up "both the old the new and the
> > beta" and it didnt work. i tried to put a log off script to delete the
> > profile but it works only when we log in as admin. this problem is killing
> > me. any help will be appriciated.

>
> What is the filename? There is a filename size limt.
> .
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 10-29-2009, 02:40 AM
Ahmed
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too lon

hey
sorry for not answering fast coz i thought i would get an e mail when
someone answers but i didnt. any way it does not matter what the file name is
coz even if i delete it when any other user logs in and get to the same web
site it will come back and we get the same problem. now you will ask which
website and i will say there are many web site that will leave some jpg files
with a very long file names. and i have 5 labs with 20 computer in each so it
is impossible to log in every computer and delete the temparory internet
files or delete the profile.


"Pegasus [MVP]" wrote:

>
> "Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
> news:15FC0B5D-223B-4CDA-A1AB-70CB0013F1CA@microsoft.com...
> > hey
> > we are having this new problem in our labs that windows create the
> > mandatory
> > profile which is located locally in the same workstation becouse there is
> > a
> > file thats too long in the temporary internet files. the profile should be
> > deleted on log off but it does not for a reason that i dont know or
> > becouse
> > it is locked. i tried using the UPHclean up "both the old the new and the
> > beta" and it didnt work. i tried to put a log off script to delete the
> > profile but it works only when we log in as admin. this problem is killing
> > me. any help will be appriciated.

>
> I would rename the file with the exessively long name.
>
>
> .
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #6 (permalink)  
Old 10-29-2009, 03:10 AM
Pegasus [MVP]
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too lon

In newsgroups you will never receive a reply by personal EMail. Replies made
by respondents will only be visible in the newsgroups themselves.

Unfortunately you are restricted to a total path+file name length of 260
characters. You will have to rename/delete the files with the excessively
long names on each and every PC. There is no other way.


"Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
news:7FCE230B-0332-4AF2-866F-458DA8157524@microsoft.com...
> hey
> sorry for not answering fast coz i thought i would get an e mail when
> someone answers but i didnt. any way it does not matter what the file name
> is
> coz even if i delete it when any other user logs in and get to the same
> web
> site it will come back and we get the same problem. now you will ask which
> website and i will say there are many web site that will leave some jpg
> files
> with a very long file names. and i have 5 labs with 20 computer in each so
> it
> is impossible to log in every computer and delete the temparory internet
> files or delete the profile.
>
>
> "Pegasus [MVP]" wrote:
>
>>
>> "Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
>> news:15FC0B5D-223B-4CDA-A1AB-70CB0013F1CA@microsoft.com...
>> > hey
>> > we are having this new problem in our labs that windows create the
>> > mandatory
>> > profile which is located locally in the same workstation becouse there
>> > is
>> > a
>> > file thats too long in the temporary internet files. the profile should
>> > be
>> > deleted on log off but it does not for a reason that i dont know or
>> > becouse
>> > it is locked. i tried using the UPHclean up "both the old the new and
>> > the
>> > beta" and it didnt work. i tried to put a log off script to delete the
>> > profile but it works only when we log in as admin. this problem is
>> > killing
>> > me. any help will be appriciated.

>>
>> I would rename the file with the exessively long name.
>>
>>
>> .
>>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #7 (permalink)  
Old 10-29-2009, 03:20 AM
Gordon
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too lon


"Pegasus [MVP]" <news@microsoft.com> wrote in message
news:u8yLkfIWKHA.5208@TK2MSFTNGP05.phx.gbl...
> In newsgroups you will never receive a reply by personal EMail.


I think the OP is talking about the "Notify me" feature of web access....

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #8 (permalink)  
Old 10-30-2009, 12:30 PM
Ahmed
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too lon

this is what i am talking about. i dont get any notification when there is a
response on my quesion

"Gordon" wrote:

>
> "Pegasus [MVP]" <news@microsoft.com> wrote in message
> news:u8yLkfIWKHA.5208@TK2MSFTNGP05.phx.gbl...
> > In newsgroups you will never receive a reply by personal EMail.

>
> I think the OP is talking about the "Notify me" feature of web access....
>
> .
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #9 (permalink)  
Old 10-30-2009, 12:40 PM
Ahmed
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too lon

hello pegasus
are u serious. u want me to go around 300 computers and delete the profile
or rename the filename. this is far from being a solution. and why it happens
at all the mandatory profile should be deleted on log off.

"Pegasus [MVP]" wrote:

> In newsgroups you will never receive a reply by personal EMail. Replies made
> by respondents will only be visible in the newsgroups themselves.
>
> Unfortunately you are restricted to a total path+file name length of 260
> characters. You will have to rename/delete the files with the excessively
> long names on each and every PC. There is no other way.
>
>
> "Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
> news:7FCE230B-0332-4AF2-866F-458DA8157524@microsoft.com...
> > hey
> > sorry for not answering fast coz i thought i would get an e mail when
> > someone answers but i didnt. any way it does not matter what the file name
> > is
> > coz even if i delete it when any other user logs in and get to the same
> > web
> > site it will come back and we get the same problem. now you will ask which
> > website and i will say there are many web site that will leave some jpg
> > files
> > with a very long file names. and i have 5 labs with 20 computer in each so
> > it
> > is impossible to log in every computer and delete the temparory internet
> > files or delete the profile.
> >
> >
> > "Pegasus [MVP]" wrote:
> >
> >>
> >> "Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
> >> news:15FC0B5D-223B-4CDA-A1AB-70CB0013F1CA@microsoft.com...
> >> > hey
> >> > we are having this new problem in our labs that windows create the
> >> > mandatory
> >> > profile which is located locally in the same workstation becouse there
> >> > is
> >> > a
> >> > file thats too long in the temporary internet files. the profile should
> >> > be
> >> > deleted on log off but it does not for a reason that i dont know or
> >> > becouse
> >> > it is locked. i tried using the UPHclean up "both the old the new and
> >> > the
> >> > beta" and it didnt work. i tried to put a log off script to delete the
> >> > profile but it works only when we log in as admin. this problem is
> >> > killing
> >> > me. any help will be appriciated.
> >>
> >> I would rename the file with the exessively long name.
> >>
> >>
> >> .
> >>

>
>
> .
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #10 (permalink)  
Old 10-30-2009, 12:50 PM
Pegasus [MVP]
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too lon

No, you don't "go around to 300 PCs" but if you are responsible for 300 of
them then it is imperative that you acquire skills in scripting and managing
them remotely. Administrators without such skills are ineffective. Here are
a couple of methods to resolve the current issue:
- Include a suitable "delete" instruction in your logon script.
- Execute a batch file from your console that gets the 300 machine names
from a text file, then deletes the offending file remotely.


"Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
news:8B31DAFE-9C41-4331-9298-7C0D7BDE7CD7@microsoft.com...
> hello pegasus
> are u serious. u want me to go around 300 computers and delete the profile
> or rename the filename. this is far from being a solution. and why it
> happens
> at all the mandatory profile should be deleted on log off.
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #11 (permalink)  
Old 10-31-2009, 08:50 AM
Ahmed
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too lon

1-a delete instruction cannot be executed in logon script coz the user does
not have previlidges and you cannot delete the user profile while he is
logged in. you may say log off script and for the same reason the user does
not have enough previliges to delete the profile "you can try it" coz i
already tried it. it works if an admin logs in and logs out.
2- regarding the second part "batch file"
the computers are distributed on 2 buildings in different labs and the
problem happens when the users visit some website so i dont know when the
problem happens and in which computer and i cant run the batch file everytime
a user logs off.
i already have all those solutions that you talked about but they are not
effecient acctually. i have a dosen of scripts now but all needs admin rights
to run att log off.

"Pegasus [MVP]" wrote:

> No, you don't "go around to 300 PCs" but if you are responsible for 300 of
> them then it is imperative that you acquire skills in scripting and managing
> them remotely. Administrators without such skills are ineffective. Here are
> a couple of methods to resolve the current issue:
> - Include a suitable "delete" instruction in your logon script.
> - Execute a batch file from your console that gets the 300 machine names
> from a text file, then deletes the offending file remotely.
>
>
> "Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
> news:8B31DAFE-9C41-4331-9298-7C0D7BDE7CD7@microsoft.com...
> > hello pegasus
> > are u serious. u want me to go around 300 computers and delete the profile
> > or rename the filename. this is far from being a solution. and why it
> > happens
> > at all the mandatory profile should be deleted on log off.
> >

>
>
> .
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #12 (permalink)  
Old 10-31-2009, 09:20 AM
Pegasus [MVP]
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too lon

*** See below.

"Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
news:41EE6C94-F36D-4DF2-B51B-E14FB284721A@microsoft.com...
> 1-a delete instruction cannot be executed in logon script coz
> (=because) the user does not have previlidges and you cannot
> delete the user profile while he is logged in. you may say log off
> script and for the same reason the user does not have enough
> previliges to delete the profile "you can try it" coz (=because)
> i already tried it. it works if an admin logs in and logs out.

*** This is getting a little puzzling. If the user does not have
*** sufficient privileges to delete a file that resides in his own
*** profile folder, how did he create it in the first place? Is
*** it perhaps that the file has the read-only attribute set, which
*** needs to be removed before he can delete the file?

> 2- regarding the second part "batch file"
> the computers are distributed on 2 buildings in different labs and the
> problem happens when the users visit some website so i dont know when the
> problem happens and in which computer and i cant run the batch file
> everytime
> a user logs off.

*** You can insert an instruction like this one into the logon script:
*** if exist "%UserProfile%\...\Long File Name.url" del
""%UserProfile%\...\Long File Name.url"
*** This does not work because the file name is too long then subst.exe
*** can be used to shorten the path.

> i already have all those solutions that you talked about but they are not
> effecient acctually. i have a dosen of scripts now but all needs admin
> rights
> to run att log off.

*** I would not worry about the solutions being efficient or not, as
*** long as they are effective (=as long as they work).

> "Pegasus [MVP]" wrote:
>
>> No, you don't "go around to 300 PCs" but if you are responsible for 300
>> of
>> them then it is imperative that you acquire skills in scripting and
>> managing
>> them remotely. Administrators without such skills are ineffective. Here
>> are
>> a couple of methods to resolve the current issue:
>> - Include a suitable "delete" instruction in your logon script.
>> - Execute a batch file from your console that gets the 300 machine names
>> from a text file, then deletes the offending file remotely.
>>
>>
>> "Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
>> news:8B31DAFE-9C41-4331-9298-7C0D7BDE7CD7@microsoft.com...
>> > hello pegasus
>> > are u serious. u want me to go around 300 computers and delete the
>> > profile
>> > or rename the filename. this is far from being a solution. and why it
>> > happens
>> > at all the mandatory profile should be deleted on log off.
>> >

>>
>>
>> .
>>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #13 (permalink)  
Old 11-02-2009, 12:40 AM
Ahmed
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too lon

helloo again
first of all i would like to thank you for the effort in trying to help me.
second i solved in anther way.
i put the delete script in the startup script instead of the log off script
and i removed the log off from shutdown menu so the user will choose to
restart always and i will be sure that the profile is deleted at start up and
it works.

the problem is that it is not only one file that cause the problem so i
cannot use

if exist "%UserProfile%\...\Long File Name.url" del

there are many website that cause the problem with files with different
extensions like url or jpg .... etc

best regards

"Pegasus [MVP]" wrote:

> *** See below.
>
> "Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
> news:41EE6C94-F36D-4DF2-B51B-E14FB284721A@microsoft.com...
> > 1-a delete instruction cannot be executed in logon script coz
> > (=because) the user does not have previlidges and you cannot
> > delete the user profile while he is logged in. you may say log off
> > script and for the same reason the user does not have enough
> > previliges to delete the profile "you can try it" coz (=because)
> > i already tried it. it works if an admin logs in and logs out.

> *** This is getting a little puzzling. If the user does not have
> *** sufficient privileges to delete a file that resides in his own
> *** profile folder, how did he create it in the first place? Is
> *** it perhaps that the file has the read-only attribute set, which
> *** needs to be removed before he can delete the file?
>
> > 2- regarding the second part "batch file"
> > the computers are distributed on 2 buildings in different labs and the
> > problem happens when the users visit some website so i dont know when the
> > problem happens and in which computer and i cant run the batch file
> > everytime
> > a user logs off.

> *** You can insert an instruction like this one into the logon script:
> *** if exist "%UserProfile%\...\Long File Name.url" del
> ""%UserProfile%\...\Long File Name.url"
> *** This does not work because the file name is too long then subst.exe
> *** can be used to shorten the path.
>
> > i already have all those solutions that you talked about but they are not
> > effecient acctually. i have a dosen of scripts now but all needs admin
> > rights
> > to run att log off.

> *** I would not worry about the solutions being efficient or not, as
> *** long as they are effective (=as long as they work).
>
> > "Pegasus [MVP]" wrote:
> >
> >> No, you don't "go around to 300 PCs" but if you are responsible for 300
> >> of
> >> them then it is imperative that you acquire skills in scripting and
> >> managing
> >> them remotely. Administrators without such skills are ineffective. Here
> >> are
> >> a couple of methods to resolve the current issue:
> >> - Include a suitable "delete" instruction in your logon script.
> >> - Execute a batch file from your console that gets the 300 machine names
> >> from a text file, then deletes the offending file remotely.
> >>
> >>
> >> "Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
> >> news:8B31DAFE-9C41-4331-9298-7C0D7BDE7CD7@microsoft.com...
> >> > hello pegasus
> >> > are u serious. u want me to go around 300 computers and delete the
> >> > profile
> >> > or rename the filename. this is far from being a solution. and why it
> >> > happens
> >> > at all the mandatory profile should be deleted on log off.
> >> >
> >>
> >>
> >> .
> >>

>
>
> .
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #14 (permalink)  
Old 11-02-2009, 03:30 AM
Pegasus [MVP]
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too lon

While I accept that there may be more than one web site that generates
exessively long file names, I do not think that there are many of them. They
tend to be malicious sites that want to prevent visitors from deleting the
files they generate. I suspect that some of your users visit sites that they
should not visit.

One way to deal with the issue is to run a script at logon time to identify
all temporary internet files with excessively long names. When you have the
list then you can examine it and discuss the issue with the users. The
script below will create such a list. Depending on the number of temporary
internet files, it might take half a minute or more to execute. Do not
retype the script - use copy and paste instead. The result will be visible
in c:\LongNames.txt

@echo off
set Len=240
if exist c:\LongNames.txt goto :eof
echo %date% %time:~0,5% %UserName% %ComputerName% > c:\LongNames.txt
set Scr=c:\TempVBS.vbs
set VB=echo^>^>%Scr%
cd 1>nul 2>%Scr%
%VB% Set oFSO = CreateObject("Scripting.FileSystemObject")
%VB% Set oWshShell = CreateObject("WScript.Shell")
%VB% sFolder = oWshShell.ExpandEnvironmentStrings( _
%VB% "%UserProfile%\Local Settings\" _
%VB% ^& "Temporary Internet Files\Content.ie5")
%VB% Set oFolder = oFSO.GetFolder(sFolder)
%VB% For Each oSubFolder In oFolder.SubFolders
%VB% For Each oFile In oSubFolder.Files
%VB% sPath = oFile.path
%VB% if len(sPath) ^> %Len% then WScript.Echo sPath
%VB% Next
%VB% Next
cscript //nologo %Scr% >> c:\LongNames.txt
del %Scr%


"Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
news:362019CD-44F9-4603-B794-7638D190168B@microsoft.com...
> helloo again
> first of all i would like to thank you for the effort in trying to help
> me.
> second i solved in anther way.
> i put the delete script in the startup script instead of the log off
> script
> and i removed the log off from shutdown menu so the user will choose to
> restart always and i will be sure that the profile is deleted at start up
> and
> it works.
>
> the problem is that it is not only one file that cause the problem so i
> cannot use
>
> if exist "%UserProfile%\...\Long File Name.url" del
>
> there are many website that cause the problem with files with different
> extensions like url or jpg .... etc
>
> best regards
>
> "Pegasus [MVP]" wrote:
>
>> *** See below.
>>
>> "Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
>> news:41EE6C94-F36D-4DF2-B51B-E14FB284721A@microsoft.com...
>> > 1-a delete instruction cannot be executed in logon script coz
>> > (=because) the user does not have previlidges and you cannot
>> > delete the user profile while he is logged in. you may say log off
>> > script and for the same reason the user does not have enough
>> > previliges to delete the profile "you can try it" coz (=because)
>> > i already tried it. it works if an admin logs in and logs out.

>> *** This is getting a little puzzling. If the user does not have
>> *** sufficient privileges to delete a file that resides in his own
>> *** profile folder, how did he create it in the first place? Is
>> *** it perhaps that the file has the read-only attribute set, which
>> *** needs to be removed before he can delete the file?
>>
>> > 2- regarding the second part "batch file"
>> > the computers are distributed on 2 buildings in different labs and the
>> > problem happens when the users visit some website so i dont know when
>> > the
>> > problem happens and in which computer and i cant run the batch file
>> > everytime
>> > a user logs off.

>> *** You can insert an instruction like this one into the logon script:
>> *** if exist "%UserProfile%\...\Long File Name.url" del
>> ""%UserProfile%\...\Long File Name.url"
>> *** This does not work because the file name is too long then subst.exe
>> *** can be used to shorten the path.
>>
>> > i already have all those solutions that you talked about but they are
>> > not
>> > effecient acctually. i have a dosen of scripts now but all needs admin
>> > rights
>> > to run att log off.

>> *** I would not worry about the solutions being efficient or not, as
>> *** long as they are effective (=as long as they work).
>>
>> > "Pegasus [MVP]" wrote:
>> >
>> >> No, you don't "go around to 300 PCs" but if you are responsible for
>> >> 300
>> >> of
>> >> them then it is imperative that you acquire skills in scripting and
>> >> managing
>> >> them remotely. Administrators without such skills are ineffective.
>> >> Here
>> >> are
>> >> a couple of methods to resolve the current issue:
>> >> - Include a suitable "delete" instruction in your logon script.
>> >> - Execute a batch file from your console that gets the 300 machine
>> >> names
>> >> from a text file, then deletes the offending file remotely.
>> >>
>> >>
>> >> "Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
>> >> news:8B31DAFE-9C41-4331-9298-7C0D7BDE7CD7@microsoft.com...
>> >> > hello pegasus
>> >> > are u serious. u want me to go around 300 computers and delete the
>> >> > profile
>> >> > or rename the filename. this is far from being a solution. and why
>> >> > it
>> >> > happens
>> >> > at all the mandatory profile should be deleted on log off.
>> >> >
>> >>
>> >>
>> >> .
>> >>

>>
>>
>> .
>>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #15 (permalink)  
Old 11-03-2009, 12:20 PM
Ahmed
Newsgroup Contributor
 
Posts: n/a
Re: Windows cannot copy file. The filename or extension is too lon

Thanx again for the script. i just made a small change in it just make it
easier for me i change the line
if len(sPath) ^> %Len% then WScript.Echo sPath
into
if len(sPath) ^> %Len% then oFile.delete
hope you dont mind and i ran it as vbscript att log off. i will put it in
one of my labs 2moro to see if it works coz it worked for me today in my test
workstation.
some of the website that made the problem are the BBC , the university home
page and youtube and others.

"Pegasus [MVP]" wrote:

> While I accept that there may be more than one web site that generates
> exessively long file names, I do not think that there are many of them. They
> tend to be malicious sites that want to prevent visitors from deleting the
> files they generate. I suspect that some of your users visit sites that they
> should not visit.
>
> One way to deal with the issue is to run a script at logon time to identify
> all temporary internet files with excessively long names. When you have the
> list then you can examine it and discuss the issue with the users. The
> script below will create such a list. Depending on the number of temporary
> internet files, it might take half a minute or more to execute. Do not
> retype the script - use copy and paste instead. The result will be visible
> in c:\LongNames.txt
>
> @echo off
> set Len=240
> if exist c:\LongNames.txt goto :eof
> echo %date% %time:~0,5% %UserName% %ComputerName% > c:\LongNames.txt
> set Scr=c:\TempVBS.vbs
> set VB=echo^>^>%Scr%
> cd 1>nul 2>%Scr%
> %VB% Set oFSO = CreateObject("Scripting.FileSystemObject")
> %VB% Set oWshShell = CreateObject("WScript.Shell")
> %VB% sFolder = oWshShell.ExpandEnvironmentStrings( _
> %VB% "%UserProfile%\Local Settings\" _
> %VB% ^& "Temporary Internet Files\Content.ie5")
> %VB% Set oFolder = oFSO.GetFolder(sFolder)
> %VB% For Each oSubFolder In oFolder.SubFolders
> %VB% For Each oFile In oSubFolder.Files
> %VB% sPath = oFile.path
> %VB% if len(sPath) ^> %Len% then WScript.Echo sPath
> %VB% Next
> %VB% Next
> cscript //nologo %Scr% >> c:\LongNames.txt
> del %Scr%
>
>
> "Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
> news:362019CD-44F9-4603-B794-7638D190168B@microsoft.com...
> > helloo again
> > first of all i would like to thank you for the effort in trying to help
> > me.
> > second i solved in anther way.
> > i put the delete script in the startup script instead of the log off
> > script
> > and i removed the log off from shutdown menu so the user will choose to
> > restart always and i will be sure that the profile is deleted at start up
> > and
> > it works.
> >
> > the problem is that it is not only one file that cause the problem so i
> > cannot use
> >
> > if exist "%UserProfile%\...\Long File Name.url" del
> >
> > there are many website that cause the problem with files with different
> > extensions like url or jpg .... etc
> >
> > best regards
> >
> > "Pegasus [MVP]" wrote:
> >
> >> *** See below.
> >>
> >> "Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
> >> news:41EE6C94-F36D-4DF2-B51B-E14FB284721A@microsoft.com...
> >> > 1-a delete instruction cannot be executed in logon script coz
> >> > (=because) the user does not have previlidges and you cannot
> >> > delete the user profile while he is logged in. you may say log off
> >> > script and for the same reason the user does not have enough
> >> > previliges to delete the profile "you can try it" coz (=because)
> >> > i already tried it. it works if an admin logs in and logs out.
> >> *** This is getting a little puzzling. If the user does not have
> >> *** sufficient privileges to delete a file that resides in his own
> >> *** profile folder, how did he create it in the first place? Is
> >> *** it perhaps that the file has the read-only attribute set, which
> >> *** needs to be removed before he can delete the file?
> >>
> >> > 2- regarding the second part "batch file"
> >> > the computers are distributed on 2 buildings in different labs and the
> >> > problem happens when the users visit some website so i dont know when
> >> > the
> >> > problem happens and in which computer and i cant run the batch file
> >> > everytime
> >> > a user logs off.
> >> *** You can insert an instruction like this one into the logon script:
> >> *** if exist "%UserProfile%\...\Long File Name.url" del
> >> ""%UserProfile%\...\Long File Name.url"
> >> *** This does not work because the file name is too long then subst.exe
> >> *** can be used to shorten the path.
> >>
> >> > i already have all those solutions that you talked about but they are
> >> > not
> >> > effecient acctually. i have a dosen of scripts now but all needs admin
> >> > rights
> >> > to run att log off.
> >> *** I would not worry about the solutions being efficient or not, as
> >> *** long as they are effective (=as long as they work).
> >>
> >> > "Pegasus [MVP]" wrote:
> >> >
> >> >> No, you don't "go around to 300 PCs" but if you are responsible for
> >> >> 300
> >> >> of
> >> >> them then it is imperative that you acquire skills in scripting and
> >> >> managing
> >> >> them remotely. Administrators without such skills are ineffective.
> >> >> Here
> >> >> are
> >> >> a couple of methods to resolve the current issue:
> >> >> - Include a suitable "delete" instruction in your logon script.
> >> >> - Execute a batch file from your console that gets the 300 machine
> >> >> names
> >> >> from a text file, then deletes the offending file remotely.
> >> >>
> >> >>
> >> >> "Ahmed" <Ahmed@discussions.microsoft.com> wrote in message
> >> >> news:8B31DAFE-9C41-4331-9298-7C0D7BDE7CD7@microsoft.com...
> >> >> > hello pegasus
> >> >> > are u serious. u want me to go around 300 computers and delete the
> >> >> > profile
> >> >> > or rename the filename. this is far from being a solution. and why
> >> >> > it
> >> >> > happens
> >> >> > at all the mandatory profile should be deleted on log off.
> >> >> >
> >> >>
> >> >>
> >> >> .
> >> >>
> >>
> >>
> >> .
> >>

>
>
> .
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
long filename -> short filename conversion incorrect Han Windows XP 7 02-14-2009 08:22 PM
long filename -> short filename conversion incorrect Han Windows XP 7 12-15-2008 08:40 AM
How to display long file names (filename) on the desktop? Peter Windows XP 1 05-02-2008 10:50 AM
Copy folder with long file names dennist Windows XP 6 09-01-2007 10:40 PM
Filename or extension is too long Surana Windows XP 3 05-05-2007 02:05 PM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 11:53 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0