Rename File
Greetings,
Is it possible to rename a file while it is open in Photoshop? I use an action when closing/saving that saves the file in 3 different sizes/formats and it would be great if I could name the file just prior to saving.
Thanks
David
Your goung about it the hard way. Do this instead. Create a simple action or actions that process the image the way or ways you want them processed. The actions should not resize or save image they should just process the image the way you want them processed. Once you have these actions. Download and install the Image Processor Pro plug-in script into your Photoshop version CS5, CS6, CC. from Russell Browns web site. Then use menu File>Automate>Image Processor Pro. Set the Image Processor Pro dialog to process your image files and save all the output files you want with the sizes and names you want. Have the Image process include you action or actions in its process.
Similar Messages
-
Rename files or folders in Windows 8 not working
Rename a file or folder on a Windows CE device is not working from Windows 8 when connected through Windows Mobile Device Center.
From Windows 7 it worked just fine!
This has been a problem for a very long time now, and im not alone according to all forums.
But no fix as far as i can find!
Is there anyone that have found a fix on this?http://answers.microsoft.com/en-us/windows/forum/windows8_1-files/windows-8-unable-to-rename-files-on-pocket-pc/abae21b7-7ee1-41c7-853e-1ac7ea5b0413
It seems a issue in window 8.x system. Maybe you can ask for a MS support ticket. -
Sharepoint 2013 ItemAdded event receiver for renaming files is not working
In SP 2013 I coded an event receiver that intercepts the ItemAdded event and it just renames the file.
It is a synchronous event (I added <Synchronization>Synchronous</Synchronization> in the Elements.xml).
This is the code:
public override void ItemAdded(SPItemEventProperties properties)
SPSecurity.RunWithElevatedPrivileges(delegate()
try
OutputDebugStringA("Inside ItemAdded");
string szHttpUrl = properties.WebUrl + "/" + properties.AfterUrl;
SPWeb openedWeb = properties.Web.Site.OpenWeb(properties.Web.ID);
SPFile spf = openedWeb.GetFile(szHttpUrl);
EventFiringEnabled = false;
string szUrl = properties.AfterUrl;
szUrl = szUrl + ".renamed";
string szNewFileName;
if (szUrl.LastIndexOf('\\') != -1) szNewFileName = szUrl.Substring(szUrl.LastIndexOf('\\') + 1);
else if (szUrl.LastIndexOf('/') != -1) szNewFileName = szUrl.Substring(szUrl.LastIndexOf('/') + 1);
else szNewFileName = szUrl;
if (properties.ListItem != null)
properties.ListItem["Title"] = szNewFileName;
properties.ListItem.Update();
spf.MoveTo(szUrl);
EventFiringEnabled = true;
base.ItemAdded(properties);
OutputDebugStringA("Renaming to " + szUrl);
catch (System.Exception exception)
OutputDebugStringA("ItemAdded ERROR: " + exception.ToString());
The problem is that when I upload a .txt file using Internet Explorer, just after the renaming is done, IE says that something went wrong and when I inspect the log files I see:
SPRequest.GetFileAndFolderProperties: UserPrincipalName=i:0).w|s-1-5-21-4050800873-4278272723-3073177257-500, AppPrincipalName= ,bstrUrl=http://sp2013/sites/demo/subsite1 ,bstrStartUrl=Shared Documents/test2.txt ,ListDocsFlags=16400 ,bThrowException=True 0fa7689c-674b-5045-c3a2-b214a5d4cbed
01/09/2014 15:29:26.75 w3wp.exe (0x1544) 0x16F4 SharePoint Foundation
General ai1wu Medium System.IO.FileNotFoundException: <nativehr>0x80070002</nativehr><nativestack></nativestack>,
StackTrace: at Microsoft.SharePoint.SPWeb.GetFileOrFolderProperties(String strUrl, ListDocsFlags listDocsFlags, Boolean throwException, SPBasePermissions& permMask) at Microsoft.SharePoint.SPFile.PropertiesCore(Boolean
throwException) at Microsoft.SharePoint.SPFile.get_Length() at Microsoft.Office.RecordsManagement.PolicyFeatures.ApplicationPages.UploadPage.OnSubmit(Object o, EventArgs e) at Microsoft.Office.RecordsManagement.PolicyFeatures.ApplicationPages.UploadExPage.OnSubmit(Object
o, EventArgs e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeSta... 0fa7689c-674b-5045-c3a2-b214a5d4cbed
...gesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext
context, AsyncCallback cb) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr
rootedObjectsPointer, IntPtr nativeRequestContex... 0fa7689c-674b-5045-c3a2-b214a5d4cbed
...t, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr
pHandler, RequestNotificationStatus& notificationStatus) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr
rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
0fa7689c-674b-5045-c3a2-b214a5d4cbed
So it is clear that the fact that I renamed the file is causing an issue in the SharePoint upload logic.
As a solution what I did was to not declare it as Synchronous, but if I do it then there is another error when Sharepoint shows the Edit Properties dialog... in this case the upload is OK but when it is time to show that Edit Property dialog IE fails and
says that the file has been already modified, or that "something went wrong".
If I use a synchronous event I get one problem. If I use the asynchronous event I get another problem... It's very frustating and I am pretty sure that a so important API like Event Receivers should have support renaming files so I hope someone can tell
me what I am doing wrong.
Thanks in advanceMay be you want to consider using the following code and see if it works for you.
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/40c78e03-2dca-4083-89d2-a7430099da68/how-do-i-change-the-name-property-of-a-file-in-a-document-library?forum=sharepointdevelopment
Amit -
Hello all. What I'm wanting to do is rename a file and then do some things with the new file name.
1. I want to view the new file name with the full path
2. I want to output the new file name with the full path to a text file or csv file
Here is what I have for outputting the renamed file into a text file, but it isn't working:
cls
$resultsfile = "C:\results3.txt"
clear-content $resultsfile
foreach($item in gc C:\RENAME.txt){
Rename-Item $item "1.txt" | out-file $resultsfile -append
notepad $resultsfile
Any thoughts on how to work with the newly renamed file name?Yes, sorry I forgot to mention that I'm trying to delete a bunch of files whose names are too long. So what I 'm trying to do is to rename the files first with "1.txt" and then I'm going to delete them. I just had a "forehead-slap" moment where I realized
I could just pipe the "rename-item" into "remove-item" and that should accomplish my goals.
But, as for my original question, if I rename a file, how can i view/use the renamed file name? Like if I renamed a file, how could I output the newly renamed file name to a text file? I tried this in my original code above, but it didn't work. Let's just
assume that I have a single file that I want to rename to "1.txt" -
Rename file name & format using ftp sender
Hi all,
This is regarding the renaming of file at sender file(FTP) communication channel and placeing the same file in the same folder.
At FTP server at sender side (i.e.clients place) is in .txt format.But now .txt file has to rename and change into .sav foramt with below required name convention of file.
client format is : SAP_Order.txt (Pervious file name).
We need to change the file in to "SAP_Order_yyyymmddThhmmss.sav" format..
How can i achieve this requirement?
Can please suggests me solutions ASAP.
Best Regards,
satya,Hi,
if your requirement is to pick the existing file in the FTP folder...and send as idoc to the target and place the renamed file to FTP folder...
then its simple...
use two receivers instead of one , one for point to target and other for sender itself... (second receiver is for changing the file name format....)
Hope the above understanding is correct...if not provide more details of your requirement...
HTH
Rajesh -
Deleting & renaming files - is there a shortcut to finder?
I am a recent convert from PC to Mac. So far so good. However, one thing starts to drive me up the wall which is deleting/renaming files in programs such as photoshop, word, excel etc.etc.
As far as I can tell, this is only possible in the finder menu. Is this Correct? I am using a lot of folders and subfolders - sometimes 3-4 levels deep. Every time I need to change/delete a file or filename - lets say while in photoshop, I have to go to finder and click my way through several levels of folders to the actual file I need to change. This is somewhat annoying and timeconsuming.
Question 1: is there a way to do these operations in - lets say photoshop directly?
Question 2: If not, is there a shortcut key that would point me automatically to the file in finder where I can make the changes?
Your input would be very helpful and save me some aggravation.
fupeHi Greg,
Thanks for your input. You are correct as far as "save" and "save as" is concerned. Windows and Mac work the same way.
However, as far as I can tell, in Mac you can only "delete" or "rename" a file in "finder" which forces you to open up finder and locate the file in order to delete or change it.
In windows you can do these 2 functions directly in the program (such as photoshop, excel or words). You do not have to go to "explorer or root directory" to make these changes which I believe would be the equivalent of "finder".
In any case, Terence solved the problem. By command clicking the name (title) of the file in any program, it opens up the directory in "finder". This way makes it easy to select the file and do the changes.
fupe -
How to open renamed files?
Hi
I rename selected files and after that want to open them.
For my purpose renaming works well like this:
tell application "Finder"
set FilesToRENAME to selection
display dialog "Change what?" default answer ""
set ChangeFROM to text returned of the result
display dialog "Change to?" default answer ""
set ChangeTO to text returned of the result
set AppleScript's text item delimiters to {ChangeFROM}
set theCount to count of FilesToRENAME
repeat with x from 1 to theCount
try
set theName to name of item x of FilesToRENAME
set FirstNamePart to first text item of theName
set LastNamePart to second text item of theName
set newName to FirstNamePart & ChangeTO & LastNamePart
set name of item x of FilesToRENAME to newName
on error errStr number theNumber
activate
display dialog "Error in changing the Name " & theNumber & return & errStr ¬
& return & "Step " & x
end try
end repeat
set AppleScript's text item delimiters to ""
end tell
Now newly renamed files don't belong anymore to FilesToRENAME. So how to point to those files now (how to make a new list from those renamed files)? I was thinking to get a path to each file inside the repeat loop and replace the name, but couldn't do it.
Thank you for any help.
VeraPierre's method is pretty clever, but if you don't happen to be using a Finder selection (choose file for example), you can also use the interesting fact that an alias keeps track of an item even if it is moved or renamed.
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px; height: 340px;
color: #000000;
background-color: #DAFFB6;
overflow: auto;"
title="this text can be pasted into the Script Editor">
-- tell application "Finder" to set filesToRename to selection as alias list
set filesToRename to (choose file with multiple selections allowed)
set changeFrom to text returned of (display dialog "Change what?" default answer "")
set changeTo to text returned of (display dialog "Change to?" default answer "")
set renamedFiles to {} -- this will be the renamed files
repeat with aFile in filesToRename
set aFile to the contents of aFile
tell application "Finder" to set theName to name of aFile
try
set tempTID to AppleScript's text item delimiters
set AppleScript's text item delimiters to {changeFrom}
set firstNamePart to first text item of theName
set lastNamePart to second text item of theName
set AppleScript's text item delimiters to tempTID
set newName to firstNamePart & changeTo & lastNamePart
tell application "Finder"
set name of aFile to newName -- aFile points to the original file
update aFile -- give Finder a chance to catch up
set the end of renamedFiles to aFile -- aFile now points to the renamed file
end tell
on error errStr number theNumber
activate me
display alert "Error " & theNumber & " in changing the Name" message errStr
end try
end repeat
renamedFiles --> aliases to the renamed files
</pre> -
Hi..I am pretty new to the world of ABAP.
I have the following task.
I need to right a function module that will be responsible for renaming files on the R/3 system (to a certain predefined format). Basically, I am thinking that FM will import/accept an old file name (incl path) as a parameter, and then FM will take care of actually renaming the file and returning the name of the new filename.
Since I am very new to all the ABAP, can any of you give me some pointers, or maybe some sample code if anybody done something similar?
All the help is appreciated.
thank youAre you talking about files on the application server. If so, you will need to copy them into the new name and delete the old one. Here is a sample program.
report zrich_0001.
parameters: d1 type localfile default '/usr/sap/TST/SYS/Data1.txt',
d2 type localfile default '/usr/sap/TST/SYS/Data2.txt'.
data: begin of itab occurs 0,
rec(20) type c,
end of itab.
data: wa(20) type c.
start-of-selection.
* open and read file 1 into an internal table
open dataset d1 for input in text mode.
if sy-subrc = 0.
do.
read dataset d1 into wa.
if sy-subrc <> 0.
exit.
endif.
itab-rec = wa.
append itab.
enddo.
endif.
close dataset d1.
* Open file 2 and copy the contents to this file
open dataset d2 for output in text mode.
loop at itab.
transfer itab to d2.
endloop.
close dataset d2.
* Delete file 1
delete dataset d1.
Welcome to SDN! Please remember to award points for any helpful answers that you might recieve. Also, when your question has been answered completly, be sure to mark as "Solved". Thanks.
Regards,
Rich Heilman -
Batch rename files preserving the original file name in metadata
How can I batch rename files while preserving the original file name in metadata? (Don't want the old file name as part of the new file name)
(Adobe CS Bridge can do this with some success, but I don't want to be dependant on this software. Results are inconsistent.)With a simple terminal script. More details needed, though.
-
Renaming files in OS X Snow Leopard with illegal chars..
I'm still using Leopard but want to know if the behavior of renaming files is on par of that in, gasp, Windows Vista. I was jsut doing a lot of renaming and it reminded me of the days I used to use Vista when renaming a file and using an 'illegal' character it would pop-up a yellow dialog (not an error window) to remind me of the characters I can use only.
In OS X Leopard 10.5x if I try to use e.g. ":" I get an error box and this then reverts the file back to its original name which erases all of what I had done, all for one char probably. On top of this the error box then gives me a cryptic message as to what the error was about:
"The name "xxxxx" cannot be used.
Try using another name, with fewer characters or no punctuation marks."
I heard that the guys working on OS X 10.6 Snow Leopard tidied everything up, doing all those things they always wanted to do, I bet they didn't get many opportunities like that! And was hoping that they did something toward file rename?
I'd expect that the erroneous char would be highlighted and some kind of error shown, but not to delete everything typed in. Can anybody tell me?
Thanks.It's a unix thing, and not quite something I'd classify as needing to be cleaned up...
• The only illegal character for file and folder names in Mac OS X is the colon “:”
• File and folder names are not permitted to begin with a dot “.”
• File and folder names may be up to 255 characters in length -
Renaming files/folders on desktop: weird.
Hi
Since I have OSX Lion, and I want to rename files/folders on my desktop nothing happens.
Or at least not what is suppose to happen. Pressing enter in a finder window works perfect, like always.
But when I hit enter on a file or folder on my desktop it go's blank.
I can't see what i'm doing, but the name will change if I typ a new one. Quit confusing and realy difficult to work with. Any idea's how to fix this?This has been driving me nuts but I accidentally found the cause...but not the solution. It is a Lion thing as spaces did not have this issue.
I am assuming you are using multiple screens (mission control, formerly spaces). If you go to screen 1 and try to rename the file you CAN see the name as you rename it. If you go to any other screen and try to rename it you get the blank space.
In my case I never rename files on my main screen. I always rename them on which ever screen I am working (word is screen 5, so docx saved to the desktop are renamed on screen 5). -
Can't delete, rename files, or move to another folder
I had posted earlier about not being able to delete, rename files, or move to another folder. It never was resolved here, and I guess Apple still hasn't done anything about it. Here's a great workaround I found though in case others need something. Download the program called "Unlocker", it's free and you can get it at http://ccollomb.free.fr/unlocker/ When you get the message about the file being in use, even though QuickTime isn't even open, you can unlock the f'ing file and do whatever you want to then, move, uh DELETE, or rename, or whatever. Try it, it's the best thing going so far seeing Apple isn't doing anything about this problem.
Hi there,
I am still struggling with this problem. Actually my coworker has the same machine, Apple pro with windows xp installed, but he does not have this problem with his quicktime 7.5. I uninstalled 7.5 and installed 7.2, but it did not solve the problem. The fact is that I don't have the problem in my laptop which I am using it in the office. I am still trouble shooting. Hopefully I can find an answer.
Peace -
Automator: Impossible to rename file using automator under Mac OS X Lion
Hi,
Before upgrade my iMac to MAC OS X Lion 10.7.2, I had service created with automator under snow leopard in order to rename my pictures file names by blocks instead of one by one. Since I'm using Lion, this one doesn't work anymore. I have completely recreate the service under Lion and the results is the same.
You can find below my workflow that is easy. The problem is the message error in the history of automator application. The message is "impossible to rename file "file name" because this one should create conflict with existing file". I already test a lot of times with different name where I'm sure that this one doesn't exist on my Mac but all the time without success (verify also with search function under mac)
If somebody can help me, it would be very interesting because I already tried to find answer on internet without success too.
Thanks in advance for your help.the whole automator and in particular the record action was substantially rewritten in snow leopard. and the record action is slow, unreliable and you can't trouble-shoot it. it's a wonder it works at all. the only advice i can give is to use it as little as possible. if at all possible avoid it altogether. if you do need to use it try using keyboard strokes instead of the mouse movement. for example. use command+c and command+v for copying and pasting and use tabbing to choose the correct box on the page.
-
Essentially, Linux created some files with colons (:) in the name on a NTFS partition where I have Windows installed. I have since uninstalled Linux, but now I can only view these files in Windows Explorer. I can't open them, I can't even rename them to
correct the problem. It's as if they don't exist, because of the invalid search paths.
If I try to rename them in Windows Explorer I get following message.
The file name you specified is no valid or too long.
Specify a different file name.
Well isnt' that something?... isn't that nice? Windows is able to display these files, but it doesn't allow me to open them and it certainly doesn't like me to rename them. So why is it whining about it then, when I'm trying to help? It says "try a different
file name". Yeah, right! Like I haven't tried that one already! It doesn't matter what file name I input it will never accept it.
So what am I supposed to do now? Ditch Windows and go back to Linux? Surely, Microsoft doesn't like the sound of that. Sure, I could reinstall Linux or run a Linux live system to correct the problem. But what good is Windows then? I might as well switch to
Linux altogether.
After doing some research I now know by fact that it's (kind of) possible to rename files from UNIX and UNIX-like operating systems to those compliant with Windows by using something called file name character translation. To some level this is essential and
necessary for Windows interoperability with other operating systems (Windows is not the only operating system in the world). But this seems to be very complicated and I can't get my head around it. My brain is in overload. I don't know where to start.
Once there was a...
There's the Windows Services for UNIX (SFU) 1.0, 2.0, 3.0, 3.5. The first two versions were based on MKS Toolkit, a package licensed by Microsoft from MKS Inc. The later versions were based on the similar Interix product, after Microsoft purchased the company
that made it.
Then there's the new Subsystem for UNIX-based Applications (SUA). These are services for UNIX components. They are supposed to have Client for NFS v3 included as well. But the server components from the SFU line is missing (e.g. Server for NFS). These are included
in Server editions of Windows.
Then there's the Microsoft Knowledge Base article
289627: "How to Enable File Name Character Translation". This article seems to describe exactly my situation.
Windows and UNIX operating systems have restrictions on valid characters that can be used in a file name. The list of illegal characters for each operating system, however, is different. For example, a UNIX file name can use a colon (:), but a Windows
file name cannot use a colon (:). If a UNIX user attempts to create a file with a Windows illegal character on a Windows Services for UNIX network file system (NFS) share, the attempt is unsuccessful and the UNIX client computer receives an input or output
error.
It goes further than that. At first glance, this KB article also seems to offer a solution to this exact problem, with examples as shown below.
For example, the following maps the UNIX colon (:) to a Windows dash (-):
0x3a : 0x2d ; replace client : with - on server
I checked these values in charmap.exe and they are correct. Except for 2D not being a "dash", it's rather a hyphen ("hyphen minus" to be exact), but these two have pretty much the same appearance and they get interchanged a lot, I'm sure
they are used to it by now. (Yes, the characters! They don't mind.)
Then there's this registry key.
HKEY_LOCAL_MACHINE\Software\Microsoft\Server For NFS\CurrentVersion\Mapping
Well, of course, I don't have Server for NFS. So this is a dead end. Well, actually, it was a dead end from the beginning...
1. First of all, I'm not working with a network share on a NAS or SAN storage. The files are on the local disk drive where Windows is installed, so that's a DAS for you.
2. I don't have SFU! Well obviously, I'm on Windows Vista! So that means SUA!
3. SUA are service components only. No server components. Can you guess what that means? Yeah... no "Server for NFS" since it's a server component.
4. Windows Vista is a client side operating system! Server for NFS is only offered for use with Windows Server systems.
5. Back to square one!
So there you have it. They all lived happy for the rest of their lives...
I'm stuck here. Can someone tell me what to do? I mean beyond the obvious option to use Linux to fixa a Windows problem? The NTFS file system itself supports colons in file names. It's Windows that doesn't, and so by default it proclaims it invalid character.
Surely, even a Windows client operating system like Windows Vista should be able to allow the user to at least rename files with invalid characters to something more sensible (from the system point of view) and valid, if not being able to open them as they
are. Just add some crazy voodoo code to it and it will work. If you can make it possible on Windows Server with UNIX user-mode subsystem on NT kernel, then what's stopping you from giving the Windows client system the same benefit?
So what now? Purchase a Windows Server 2012 R2 license, copy my invalid files to a NAS share with NFS on a UNIX or Linux system, and have a go at the Windows registry and Server for NFS? Yeah... you're right, it's probably a bit over the top...
On a second thought... I might as well install Linux again. There are countless situations where Linux has helped me solve problems related to, and more often than not caused by Windows.Essentially, Linux created some files with colons (:) in the name on a NTFS partition where I have Windows installed. I have since uninstalled Linux, but now I can only view these files in Windows Explorer. I can't open them, I can't even rename them to
correct the problem. It's as if they don't exist, because of the invalid search paths.
If I try to rename them in Windows Explorer I get following message.
The file name you specified is no valid or too long.
Specify a different file name.
Well isnt' that something?... isn't that nice? Windows is able to display these files, but it doesn't allow me to open them and it certainly doesn't like me to rename them. So why is it whining about it then, when I'm trying to help? It says "try a different
file name". Yeah, right! Like I haven't tried that one already! It doesn't matter what file name I input it will never accept it.
So what am I supposed to do now? Ditch Windows and go back to Linux? Surely, Microsoft doesn't like the sound of that. Sure, I could reinstall Linux or run a Linux live system to correct the problem. But what good is Windows then? I might as well switch to
Linux altogether.
After doing some research I now know by fact that it's (kind of) possible to rename files from UNIX and UNIX-like operating systems to those compliant with Windows by using something called file name character translation. To some level this is essential and
necessary for Windows interoperability with other operating systems (Windows is not the only operating system in the world). But this seems to be very complicated and I can't get my head around it. My brain is in overload. I don't know where to start.
Once there was a...
There's the Windows Services for UNIX (SFU) 1.0, 2.0, 3.0, 3.5. The first two versions were based on MKS Toolkit, a package licensed by Microsoft from MKS Inc. The later versions were based on the similar Interix product, after Microsoft purchased the company
that made it.
Then there's the new Subsystem for UNIX-based Applications (SUA). These are services for UNIX components. They are supposed to have Client for NFS v3 included as well. But the server components from the SFU line is missing (e.g. Server for NFS). These are included
in Server editions of Windows.
Then there's the Microsoft Knowledge Base article
289627: "How to Enable File Name Character Translation". This article seems to describe exactly my situation.
Windows and UNIX operating systems have restrictions on valid characters that can be used in a file name. The list of illegal characters for each operating system, however, is different. For example, a UNIX file name can use a colon (:), but a Windows
file name cannot use a colon (:). If a UNIX user attempts to create a file with a Windows illegal character on a Windows Services for UNIX network file system (NFS) share, the attempt is unsuccessful and the UNIX client computer receives an input or output
error.
It goes further than that. At first glance, this KB article also seems to offer a solution to this exact problem, with examples as shown below.
For example, the following maps the UNIX colon (:) to a Windows dash (-):
0x3a : 0x2d ; replace client : with - on server
I checked these values in charmap.exe and they are correct. Except for 2D not being a "dash", it's rather a hyphen ("hyphen minus" to be exact), but these two have pretty much the same appearance and they get interchanged a lot, I'm sure
they are used to it by now. (Yes, the characters! They don't mind.)
Then there's this registry key.
HKEY_LOCAL_MACHINE\Software\Microsoft\Server For NFS\CurrentVersion\Mapping
Well, of course, I don't have Server for NFS. So this is a dead end. Well, actually, it was a dead end from the beginning...
1. First of all, I'm not working with a network share on a NAS or SAN storage. The files are on the local disk drive where Windows is installed, so that's a DAS for you.
2. I don't have SFU! Well obviously, I'm on Windows Vista! So that means SUA!
3. SUA are service components only. No server components. Can you guess what that means? Yeah... no "Server for NFS" since it's a server component.
4. Windows Vista is a client side operating system! Server for NFS is only offered for use with Windows Server systems.
5. Back to square one!
So there you have it. They all lived happy for the rest of their lives...
I'm stuck here. Can someone tell me what to do? I mean beyond the obvious option to use Linux to fixa a Windows problem? The NTFS file system itself supports colons in file names. It's Windows that doesn't, and so by default it proclaims it invalid character.
Surely, even a Windows client operating system like Windows Vista should be able to allow the user to at least rename files with invalid characters to something more sensible (from the system point of view) and valid, if not being able to open them as they
are. Just add some crazy voodoo code to it and it will work. If you can make it possible on Windows Server with UNIX user-mode subsystem on NT kernel, then what's stopping you from giving the Windows client system the same benefit?
So what now? Purchase a Windows Server 2012 R2 license, copy my invalid files to a NAS share with NFS on a UNIX or Linux system, and have a go at the Windows registry and Server for NFS? Yeah... you're right, it's probably a bit over the top...
On a second thought... I might as well install Linux again. There are countless situations where Linux has helped me solve problems related to, and more often than not caused by Windows. -
Hi. Macophile just starting to tread the waters of Applescript, trying to use Automator but don't think it will do what I need.
I have many images stored with-in folders that I would like to extrapolate a given number of characters from the folder name and Add Text to the files within those given folders.
Basically...
Folder name is C00100_Descriptive
Files within folder are just Descriptive_01, Descriptive_02
Would like to make all files within a given folder take the first 7 characters from the folder and Add that text to all files and files within subfolders of that folder to make the resulting files shown as...
C00100Descriptive01
C00100Descriptive02
Along with this I would also like to incorporate into the script, an added step to create Thumbnail jpegs of the image files in a Subfolder under C00100_Descriptive folder.
I can see how to do that in automator but not specifying parameters such as taking a certain number of characters from the folder the file resides in and adding that selected text to the files.
Ideally I would like a droplet or something that I could take a bunch of folders and drop them on the droplet to perform these actions.
Any advice, help or guidance would be really helpful! Thanks in advance.Awesome, you're quite welcome, glad to hear it worked for ya!! Here's another version of the script that will rename the thumb files as jpg...
<pre style="width:630px;height:auto;overflow-x:auto;overflow-y:hidden;"
title="Copy this code and paste it into your Script Editor application.">on run
set theItems to choose folder with multiple selections allowed
open (theItems)
end run
on open (itemList)
repeat with anItem in itemList
set theInfo to info for anItem
--VERIFY THAT THE OPENED ITEM IS A FOLDER
if folder of theInfo and not package folder of theInfo then
--SET PATH TO THE FOLDER
set theFolder to POSIX path of anItem
--GET FIRST PART OF FOLDER NAME
set folderNameStart to do shell script "echo " & ¬
quoted form of (name of theInfo) & "|awk -F'_' '{print $1}'"
--GET ALL FILE NAMES
set fileList to list folder anItem without invisibles
--PROCEED IF FOLDER NOT EMPTY
if fileList is not {} then
--SET PATH TO THUMBNAIL FOLDER
set thumbFolder to theFolder & "_thumbs/"
--CREATE FOLDER IF IT DOESN'T ALREADY EXIST
try
do shell script "mkdir " & quoted form of thumbFolder
end try
--PROCESS FILES
repeat with fileName in fileList
--SET PATH TO CURRENT FILE
set oldFile to theFolder & fileName
--PROCEED IF FILE IS NOT A FOLDER
set oldFileInfo to info for POSIX file oldFile
if not folder of oldFileInfo then
--SET NEW FILE AND THUMB FILE PATHS
set newFileName to folderNameStart & "_" & fileName
set newFile to theFolder & newFileName
set theExt to name extension of oldFileInfo
set thumbName to text 1 through -((length of theExt) + 1) of newFileName & "jpg"
set thumbFile to thumbFolder & "thumb_" & thumbName
--RENAME FILE
do shell script "mv " & quoted form of oldFile & space & ¬
quoted form of newFile
--CREATE THUMBNAIL
--REPLACE '128' WITH MAX HEIGHT OR WIDTH OF THUMB
try
do shell script "sips -s format jpeg -s dpiHeight 72 -s dpiWidth 72 -Z 128 " & ¬
quoted form of newFile & " --out " & quoted form of thumbFile
end try
end if
end repeat
end if
end if
end repeat
end open</pre> -
Please advise how to custom batch rename files with Aperture 3 in the following format: IMG_0023.cr2 to Smith_120816_0023.cr2? I cannot find a way to structure the date in Aperture as such (YYMMDD), as well as extract only the camera file (0023, for example). Adobe Bridge CS5 can do this, but NONE of the Adobe software is retina optimized, and is terrible to look at.
In Aperture you are limited to renaming files by the entries in the File Naming preset window.
At what point are you looking to rename, import or export? It might be possible to do what you are looking to do external to Aperture either via a script or other software.
regards
Maybe you are looking for
-
Hello everybody, I bought my iMac in Holland in 2009 but I live in Sweden, I made an Apple id here and it works for the Apple Store, but it doesn't work with Itunes as I have my itunes in Dutch of course and am right away transferred to the Swedish i
-
SET COMPANY CODE TO PRODUCTIVE
Hi: I'm setting the company code to productive, is it possible to include this configuration in a transport request. I am not able to do so as it doesn't ask for a transport request. The menu to manually assign them to a transport request is also gra
-
PACMAN: connection time out, PASV
Hello: This seems to be a regular topic in the forum, but I tried to solve and I could not. I just installed Archlinux, so, I'm still in console mode and can not paste the information. When I try to do the: pacman -Syy for the update, I get that the
-
I remember the days when one could reliable and quickly interrupt any process that hung or took longer than expected by pressing "Command + .". Since upgrading to MacOS 10.4.9 I experience mainly under Safari and other apps many instances where my Po
-
JAVA Read XML file and modify attribute values based on some conditions
I have the following XML file "C:/Data.xml". If the attributes on Dimension, Metirc, Data date Matches then Add the amount values and remove the duplicate DS node. I looked some examples on hashtable/hashmapping but I could not find that meets my cre