short-filenames

FAT32: set long filename and 8.3 filename separately [closed]

空扰寡人 提交于 2021-02-04 21:35:21
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 8 years ago . Improve this question I need to construct a SDHC card (FAT32) with a directory where I have chosen the short and long filenames independently. E.g. short filename MYDIR but long name i am a cool name. yeah. check out the awesomeness. Based on Wikipedia, there is no mandatory correlation between the two names, so

Delete file with specific extension in batch file

眉间皱痕 提交于 2021-02-04 18:50:37
问题 I would like to recursively delete all files with a specific extension in a batch file. I am aware of the following command: del /s *.ext However, this does on Windows also delete files with other extensions like e.g. .ext1 or .ext2 . The reason for this seems to be that the 8.3 file name of such a file ends with .ext and therefore also the files with longer extensions are matched. I am looking for a replacement to the command above that recursively deletes all files with .ext extension but

How to set FAT32 short names in Powershell or Windows Command Shell

一笑奈何 提交于 2019-12-14 01:32:00
问题 I need to write a script that sets the short name of a file on a FAT32 file system. On NTFS I can use the FSUTIL utility under windows but I cannot seem to fathom out how to do this for a FAT32 drive. Bonus kudos for a window command or powershell script 回答1: They made this superhard to get at, but here is one solution: http://technet.microsoft.com/en-us/library/ee692751.aspx 来源: https://stackoverflow.com/questions/4115519/how-to-set-fat32-short-names-in-powershell-or-windows-command-shell

How to get short-filenames in Windows using Java?

谁都会走 提交于 2019-12-08 16:18:16
问题 How to get the short-filename for a long-filename in Windows using Java? I need to determine the short-filenames of files, stored on a Windows system, using Java(tm). 回答1: Self Answer There are related questions with related answers. I post this solution, however, because it uses Java(tm) code without the need for external libraries. Additional solutions for different versions of Java and/or Microsoft(R) Windows(tm) are welcome. Main Concept Main concept lies in calling CMD from Java(tm) by

Convert long filename to short filename (8.3)

让人想犯罪 __ 提交于 2019-12-07 18:16:30
问题 I want to convert long filenames/path to short filenames (8.3). I'm developing a script that calls a command line tool that only accepts short filenames. So i need to convert C:\Ruby193\bin\test\New Text Document.txt to C:\Ruby193\bin\test\NEWTEX~1.TXT So far i found How to get long filename from ARGV which uses WIN32API to convert short to long filenames (the opposite of what I want to achieve). Is there any way to get the short filename in Ruby? 回答1: You can do this using FFI; there's

Convert long filename to short filename (8.3)

久未见 提交于 2019-12-05 18:25:51
I want to convert long filenames/path to short filenames (8.3). I'm developing a script that calls a command line tool that only accepts short filenames. So i need to convert C:\Ruby193\bin\test\New Text Document.txt to C:\Ruby193\bin\test\NEWTEX~1.TXT So far i found How to get long filename from ARGV which uses WIN32API to convert short to long filenames (the opposite of what I want to achieve). Is there any way to get the short filename in Ruby? You can do this using FFI ; there's actually an example that covers your exact scenario in their wiki under the heading "Convert a path to 8.3 style

Java call for Windows API GetShortPathName

十年热恋 提交于 2019-12-01 10:28:01
I'd like to use native windows api function in my java class. The function I am interested in is GetShortPathName. http://msdn.microsoft.com/en-us/library/aa364989%28VS.85%29.aspx I tried to use this - http://dolf.trieschnigg.nl/eightpointthree/eightpointthree.html but in some conditions java crashes completely when I use it, so it is not the option for me. The question is Do I have to write code in e.g C, make DLL and then use that DLL in JNI/JNA? Or maybe I somehow can access the system API in different way? I will appreciate your comments. If maybe you could post some code as the example I

Java call for Windows API GetShortPathName

可紊 提交于 2019-12-01 07:49:02
问题 I'd like to use native windows api function in my java class. The function I am interested in is GetShortPathName. http://msdn.microsoft.com/en-us/library/aa364989%28VS.85%29.aspx I tried to use this - http://dolf.trieschnigg.nl/eightpointthree/eightpointthree.html but in some conditions java crashes completely when I use it, so it is not the option for me. The question is Do I have to write code in e.g C, make DLL and then use that DLL in JNI/JNA? Or maybe I somehow can access the system API

Convert long filename to short filename (8.3) using cmd.exe

♀尐吖头ヾ 提交于 2019-11-27 12:21:54
I am trying to convert a long filename to a short filename (8.3) on Windows. A batch-file with a command line argument works as intended: short.bat : @echo OFF echo %~s1 calling short.bat C:\Documents and Settings\User\NTUSER.DAT returns C:\DOCUM~1\USER\NTUSER.DAT However, I don't like having an extra .bat-file for this. I would rather call cmd.exe with the whole command from a ruby script. How can I do this? As an intermediate step I tried to hardcode the path in the batch-file, but that does not work: short1.bat : @echo OFF SET filename="C:\Documents and Settings\User\NTUSER.DAT" echo

Convert long filename to short filename (8.3) using cmd.exe

情到浓时终转凉″ 提交于 2019-11-26 15:58:58
问题 I am trying to convert a long filename to a short filename (8.3) on Windows. A batch-file with a command line argument works as intended: short.bat : @echo OFF echo %~s1 calling short.bat C:\Documents and Settings\User\NTUSER.DAT returns C:\DOCUM~1\USER\NTUSER.DAT However, I don't like having an extra .bat-file for this. I would rather call cmd.exe with the whole command from a ruby script. How can I do this? As an intermediate step I tried to hardcode the path in the batch-file, but that